Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest google code update #1

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
bb5faf3
updated project to lastest google webrtc example iOS and supporting code
Nov 6, 2013
1fef630
updated project to lastest google webrtc example iOS and supporting code
Nov 6, 2013
b23cbe3
Update README.md
Nov 6, 2013
2fe4f96
added fixes for video receipt and transimission
Nov 14, 2013
640d270
Merge branch 'master' of https://github.com/gandg/webrtc-ios
Nov 14, 2013
e935a03
added webRTC objc code for the google lib build phase
Nov 14, 2013
b73ac65
Update README.md
Nov 14, 2013
4d0b119
Merge branch 'master' of https://github.com/gandg/webrtc-ios
Nov 14, 2013
5e5cc0d
Update README.md
Nov 14, 2013
6e9e214
Update README.md
Nov 14, 2013
8c806b6
Update README.md
Nov 14, 2013
f3deba9
Update README.md
Nov 14, 2013
928676b
Update README.md
Nov 14, 2013
f4b2c0d
Update README.md
Nov 14, 2013
e3a04f8
code cleanup
Nov 15, 2013
a6410bf
Merge branch 'master' of https://github.com/gandg/webrtc-ios
Nov 15, 2013
cdf1282
updated readme
Nov 15, 2013
8e14852
updated readme
Nov 15, 2013
3bf5e9d
Fix workstation-dependent compilation error. Add gitignore.
jznadams Nov 16, 2013
b51d871
Merge pull request #1 from Ninjanetic/compilation-fix
Nov 18, 2013
e79b171
Update README.md
Nov 25, 2013
e993bb9
updated rendered video to fit iPhone full screen
Dec 3, 2013
6cf15dc
.DS_Store banished!
Dec 3, 2013
bf3eac7
Merge branch 'master' of https://github.com/gandg/webrtc-ios
Dec 3, 2013
005c6f0
updated
Dec 3, 2013
69bda6a
clarified build directions
Dec 17, 2013
c29150f
Update README.md
Jan 8, 2014
b60e636
Update README.md
Feb 27, 2014
4e517c9
fix bug:issue_2
YK-Unit Mar 6, 2014
037d186
fix bug:issue_2
YK-Unit Mar 6, 2014
78ecd59
Merge pull request #2 from YK-Unit/issue_2
Mar 6, 2014
fa3e908
updated to support for compiling qith iOS7 SDK, Xcode 5.1, and iOS 7.…
Apr 29, 2014
14d38d0
Update README.md
Apr 29, 2014
c2f79c8
removed trunk directory
Apr 29, 2014
e3bc6fa
Merge branch 'master' of https://github.com/gandg/webrtc-ios
Apr 29, 2014
50eef7f
Update README.md
Apr 29, 2014
a2d9842
added loading text; disconnect button and more log messages
Apr 29, 2014
862263c
change html parser to use json
lineker Jul 5, 2014
c5632a3
Merge pull request #4 from lineker/fix-demo
Jul 15, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
ios-example/AppRTCDemo.xcodeproj/project.xcworkspace/xcuserdata/
ios-example/AppRTCDemo.xcodeproj/xcuserdata/
*/Build/*
97 changes: 92 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,93 @@
project on ios platform.
webRTC iOS example app.

Forked from newOcean. Updated to the latest webrtc iOS example code from google. Not sure the trunk directory is needed.

To Run example:

- Build this code for a device (iPad or iPhone).
- Open a Google Chrome browser (not IE, Firefox or Safari - spent a day debugging why Firefox was not working - CHROME!!)
- Open this URL: https://apprtc.appspot.com
- Ensure the camera on your laptop has an image
- Make note of the room number in the URL after loading web page
- Run the iOS app and type in the room number
- Stand back .... Should here feedback audio between your laptop and iOS device.
- NOTE - the audio is the only channel implemented by Google, the video render portion on iOS is not implemented yet.


UPDATE 11/14/13:
- Video support added!
- Now video and audio are both full duplex
- Code is not ideal, needs to be cleaned up, to repeat, CODE IS A HACK and needs clean up
- Big thanks to [Bridger Maxwell] (http://www.bridgermaxwell.com) for the webRTC objC video code - totally could not be done without his help, THANK YOU!
- This [thread](https://groups.google.com/forum/#!msg/discuss-webrtc/vBD_A7gY9Io/I5YFux--6HgJ) on google groups was VERY, VERY helpful
- These libraries are the key to bringing video to life:
- ios-example/libs/libjingle.a
- ios-example/libs/libjingle_media.a
- ios-example/libs/libjingle_peerconnection_objc.a
- ios-example/libs/libvideo_render_module.a

To build XCode iOS app only for device (not simulator):
- project location: webrtc-ios/ios-example/AppRTCDemo.xcodeproj
- Open the XCode project and set target for iPad / iPhone
- Build and run
- Should work without changes
(webrtc branch 3.46)

To build the video and jingle libs yourself, which you can then copy back into the ios-example/libs directory:
- Download a copy of the Google WebRTC build tools and code [here](http://www.webrtc.org/reference/getting-started)
(webrtc branch 3.46)
- Copy the files in the webrtc_obj dir into this dir ...projdir.../trunk/talk/app/webrtc/objc
- Build the AppRTCDemo target: wrios && gclient runhooks && ninja -C out_ios/Debug AppRTCDemo
- Copy the resulting libs back into the Xcode project
cp ...projdir.../trunk/out_ios/Debug/libvideo_render_module.a ...projdir.../ios_app/webrtc-ios/ios-example/libs
- I am not using the trunk dir provided in this repo. Using the Google trunk that you downloaded in step one instead.

Update 4/29/14:
- iOS7, Mavericks, and XCode 5.1 update!!
- Ensured my local repo was in sync with github
- Set SDK and target device to 7.1
- Compiled and saw over 100+ errors
- Determined that "Other Linker Flags" needed to be set to:
"-stdlib=libstdc++"
- fixed all 100+ errors
- URL for stun server in JSON key changed from URL to URLS, so changed parser
- Ran client SW on my iPhone5 running 7.1
- Worked!

My Test setup as of 4/29/14:
- MacBook Pro wih OSX 10.9.2
- Chrome browser connected to apprtc.appspot.com
- iPhone5 (iOS7) connected to Xcode 5.1 via debugger
- Occasionaly, I hit an issue with the TURN server not being reachable and need to re-run the app. Some networks this is worse, e.g. home network versus work.


Contributing:
- Fork it
- Create your feature branch (`git checkout -b my_new_feature`)
- Commit your changes (`git commit -m 'Added some feature' -a`)
- Push to the branch (`git push origin my_new_feature`)
- Create a new Pull Request
- Please send in your changes!!

Again, this code needs a lot of cleanup, so please use at own risk. Enjoy!

## License

Copyright 2013, 2014 Gregg Ganley, All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this project source code except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


[![analytics](http://www.google-analytics.com/collect?v=1&t=pageview&_s=1&dl=https%3A%2F%2Fgithub.com%2Fwebrtc-ios%2Fabout&_u=MAC~&cid=1757014354.1393964045&tid=UA-24755641-1)]()


There is so many people wanting to use webrtc on ios, But nobody give a completely building project.
After a lot of modification, I have sucessful building librarys and AppRTCDemo.
I would like to share with other developers, just for reference.
BTW,please copy the Missing files from google,it take tooo long to upload total project^-^.
Binary file removed ios-example/.DS_Store
Binary file not shown.
49 changes: 45 additions & 4 deletions ios-example/AppRTCDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
186CA7591836D3DB00CE8212 /* VideoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 186CA7581836D3DB00CE8212 /* VideoView.m */; };
29334CB717C1E49200062CBB /* libcrssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29334CB117C1E49200062CBB /* libcrssl.a */; };
29334CB817C1E49200062CBB /* libicudata.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29334CB217C1E49200062CBB /* libicudata.a */; };
29334CB917C1E49200062CBB /* libicui18n.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29334CB317C1E49200062CBB /* libicui18n.a */; };
Expand Down Expand Up @@ -83,9 +84,19 @@
4FD7F5011732E1C2009295E5 /* APPRTCAppClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FD7F5001732E1C2009295E5 /* APPRTCAppClient.m */; };
4FEE3E531743C94D0005814A /* ios_channel.html in Resources */ = {isa = PBXBuildFile; fileRef = 4FEE3E511743C92D0005814A /* ios_channel.html */; };
4FEE3EB71746A3810005814A /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 4FEE3EB61746A3810005814A /* Icon.png */; };
FE2A3867182D981300E10046 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE2A3866182D981300E10046 /* OpenGLES.framework */; };
FE2A3869182D989D00E10046 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE2A3868182D989D00E10046 /* QuartzCore.framework */; };
FE680E6E182AE41900C0D516 /* libaudio_processing_neon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FE680E6D182AE41900C0D516 /* libaudio_processing_neon.a */; };
FE680E70182AE43C00C0D516 /* libacm2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FE680E6F182AE43C00C0D516 /* libacm2.a */; };
FE680E72182AE44600C0D516 /* libcommon_audio_neon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FE680E71182AE44600C0D516 /* libcommon_audio_neon.a */; };
FE680E76182AE45F00C0D516 /* libisac_neon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FE680E73182AE45F00C0D516 /* libisac_neon.a */; };
FE680E77182AE45F00C0D516 /* libvpx_asm_offsets_vp8.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FE680E74182AE45F00C0D516 /* libvpx_asm_offsets_vp8.a */; };
FE680E78182AE45F00C0D516 /* libvpx_asm_offsets_vpx_scale.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FE680E75182AE45F00C0D516 /* libvpx_asm_offsets_vpx_scale.a */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
186CA7571836D3DB00CE8212 /* VideoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoView.h; sourceTree = "<group>"; };
186CA7581836D3DB00CE8212 /* VideoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoView.m; sourceTree = "<group>"; };
29334CB117C1E49200062CBB /* libcrssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrssl.a; path = libs/libcrssl.a; sourceTree = "<group>"; };
29334CB217C1E49200062CBB /* libicudata.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libicudata.a; path = libs/libicudata.a; sourceTree = "<group>"; };
29334CB317C1E49200062CBB /* libicui18n.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libicui18n.a; path = libs/libicui18n.a; sourceTree = "<group>"; };
Expand Down Expand Up @@ -190,13 +201,23 @@
4FD7F5001732E1C2009295E5 /* APPRTCAppClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APPRTCAppClient.m; sourceTree = "<group>"; };
4FEE3E511743C92D0005814A /* ios_channel.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ios_channel.html; sourceTree = "<group>"; };
4FEE3EB61746A3810005814A /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../Icon.png; sourceTree = "<group>"; };
FE2A3866182D981300E10046 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
FE2A3868182D989D00E10046 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
FE680E6D182AE41900C0D516 /* libaudio_processing_neon.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libaudio_processing_neon.a; path = libs/libaudio_processing_neon.a; sourceTree = "<group>"; };
FE680E6F182AE43C00C0D516 /* libacm2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libacm2.a; path = libs/libacm2.a; sourceTree = "<group>"; };
FE680E71182AE44600C0D516 /* libcommon_audio_neon.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcommon_audio_neon.a; path = libs/libcommon_audio_neon.a; sourceTree = "<group>"; };
FE680E73182AE45F00C0D516 /* libisac_neon.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libisac_neon.a; path = libs/libisac_neon.a; sourceTree = "<group>"; };
FE680E74182AE45F00C0D516 /* libvpx_asm_offsets_vp8.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvpx_asm_offsets_vp8.a; path = libs/libvpx_asm_offsets_vp8.a; sourceTree = "<group>"; };
FE680E75182AE45F00C0D516 /* libvpx_asm_offsets_vpx_scale.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvpx_asm_offsets_vpx_scale.a; path = libs/libvpx_asm_offsets_vpx_scale.a; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
4FBCC0481728E929004C8C0B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FE2A3869182D989D00E10046 /* QuartzCore.framework in Frameworks */,
FE2A3867182D981300E10046 /* OpenGLES.framework in Frameworks */,
2945DB3517C21D60004BEFD1 /* libsqlite3.dylib in Frameworks */,
2945DB3317C21D25004BEFD1 /* libstdc++.dylib in Frameworks */,
4F995B91173C03A1007F179A /* AudioToolbox.framework in Frameworks */,
Expand Down Expand Up @@ -264,6 +285,12 @@
29334CBB17C1E49200062CBB /* libjpeg.a in Frameworks */,
29334CBC17C1E49200062CBB /* libsqlite_regexp.a in Frameworks */,
29A1B10817C377A30012C3FF /* libwebrtc_vp8.a in Frameworks */,
FE680E6E182AE41900C0D516 /* libaudio_processing_neon.a in Frameworks */,
FE680E70182AE43C00C0D516 /* libacm2.a in Frameworks */,
FE680E72182AE44600C0D516 /* libcommon_audio_neon.a in Frameworks */,
FE680E76182AE45F00C0D516 /* libisac_neon.a in Frameworks */,
FE680E77182AE45F00C0D516 /* libvpx_asm_offsets_vp8.a in Frameworks */,
FE680E78182AE45F00C0D516 /* libvpx_asm_offsets_vpx_scale.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -314,12 +341,18 @@
2953C4AF17BE129D001DA8CF /* librbe_components.a */,
2953C4A217BE1284001DA8CF /* libcommon_audio.a */,
2953C4A317BE1284001DA8CF /* libcrnspr.a */,
FE680E73182AE45F00C0D516 /* libisac_neon.a */,
FE680E74182AE45F00C0D516 /* libvpx_asm_offsets_vp8.a */,
FE680E75182AE45F00C0D516 /* libvpx_asm_offsets_vpx_scale.a */,
FE680E71182AE44600C0D516 /* libcommon_audio_neon.a */,
2953C4A417BE1284001DA8CF /* libcrnss.a */,
2953C4A517BE1284001DA8CF /* libcrnssckbi.a */,
FE680E6F182AE43C00C0D516 /* libacm2.a */,
2953C4A617BE1284001DA8CF /* libdesktop_capture.a */,
2953C49C17BE1210001DA8CF /* libvoice_engine.a */,
2953C49D17BE1210001DA8CF /* libvpx.a */,
2953C49E17BE1210001DA8CF /* libyuv.a */,
FE680E6D182AE41900C0D516 /* libaudio_processing_neon.a */,
4F995B01173B6937007F179A /* libaudio_coding_module.a */,
4F995B02173B6937007F179A /* libaudio_conference_mixer.a */,
4F995B03173B6937007F179A /* libaudio_device.a */,
Expand Down Expand Up @@ -365,6 +398,8 @@
4FBCC0421728E929004C8C0B = {
isa = PBXGroup;
children = (
FE2A3868182D989D00E10046 /* QuartzCore.framework */,
FE2A3866182D981300E10046 /* OpenGLES.framework */,
2945DB3417C21D60004BEFD1 /* libsqlite3.dylib */,
2945DB3217C21D25004BEFD1 /* libstdc++.dylib */,
4FBCC0541728E929004C8C0B /* AppRTCDemo */,
Expand Down Expand Up @@ -400,6 +435,8 @@
4FBCC0541728E929004C8C0B /* AppRTCDemo */ = {
isa = PBXGroup;
children = (
186CA7571836D3DB00CE8212 /* VideoView.h */,
186CA7581836D3DB00CE8212 /* VideoView.m */,
2945DAFF17C20E24004BEFD1 /* public */,
4FBCC0711729B780004C8C0B /* GAEChannelClient.h */,
4FBCC0721729B780004C8C0B /* GAEChannelClient.m */,
Expand Down Expand Up @@ -498,6 +535,7 @@
4FBCC05F1728E929004C8C0B /* APPRTCAppDelegate.m in Sources */,
4FBCC0681728E929004C8C0B /* APPRTCViewController.m in Sources */,
4FBCC0731729B780004C8C0B /* GAEChannelClient.m in Sources */,
186CA7591836D3DB00CE8212 /* VideoView.m in Sources */,
4FD7F5011732E1C2009295E5 /* APPRTCAppClient.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -541,8 +579,9 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
ONLY_ACTIVE_ARCH = YES;
"OTHER_LDFLAGS[arch=*]" = "-stdlib=libstdc++";
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -565,7 +604,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down Expand Up @@ -617,14 +656,15 @@
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = "AppRTCDemo/AppRTCDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/libs\"",
);
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 1;
VALID_ARCHS = armv7;
WRAPPER_EXTENSION = app;
};
Expand All @@ -646,14 +686,15 @@
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = "AppRTCDemo/AppRTCDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/libs\"",
);
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 1;
VALID_ARCHS = armv7;
WRAPPER_EXTENSION = app;
};
Expand Down
17 changes: 12 additions & 5 deletions ios-example/AppRTCDemo/APPRTCAppClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,21 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/*
*
* Last updated by: Gregg Ganley
* Nov 2013
*
*/

#import <Foundation/Foundation.h>

#import "GAEChannelClient.h"

// Called when there are RTCIceServers.
@protocol IceServerDelegate <NSObject>
// Called when there are RTCICEServers.
@protocol ICEServerDelegate<NSObject>

- (void)onIceServers:(NSArray *)servers;
- (void)onICEServers:(NSArray*)servers;

@end

Expand All @@ -45,8 +52,8 @@
// for the registered handler to be called with received messages.
@interface APPRTCAppClient : NSObject<NSURLConnectionDataDelegate>

@property(nonatomic, assign) id<IceServerDelegate>iceServerDelegate;
@property(nonatomic, assign) id<GAEMessageHandler>messageHandler;
@property(nonatomic, assign) id<ICEServerDelegate> ICEServerDelegate;
@property(nonatomic, assign) id<GAEMessageHandler> messageHandler;

- (void)connectToRoom:(NSURL *)room;
- (void)sendData:(NSData *)data;
Expand Down
Loading