WebRTC on a standalone mobile app -
i know webrtc
designed browsers, possible use webrtc libraries on mobile applications directly?
thanks!
as of may 14 here android project using webrtc
works nicely.
i translated entire android project objective-c
ios , got webrtc working in ios i'm having trouble on iphone 4 , 4s. works in iphone 5 , 5s.
i think problem performance. when make videocall webrtc libraries takes 140% of cpu on iphone 5, guess that's lot of resources , iphone 4s can't handle it.
edited
after struggling video connection (always disconnected after 10 seconds) got webrtc working on iphone 4s, have set right constraints when creating local videosource capturing object:
nsstring *_width = @"320"; nsstring *_height = @"180"; nsstring *_maxframerate = @"10"; rtcmediaconstraints *videoconstraints = [[rtcmediaconstraints alloc] initwithmandatoryconstraints:@[[[rtcpair alloc] initwithkey:@"maxheight" value:_height], [[rtcpair alloc] initwithkey:@"maxwidth" value:_width], [[rtcpair alloc] initwithkey:@"maxframerate" value:_maxframerate]] optionalconstraints:@[[[rtcpair alloc] initwithkey:@"googcpuoverusedetection" value:@"true"], [[rtcpair alloc] initwithkey:@"googcpulimitedresolution" value:@"true"]]]; rtcvideosource *videosource = [factory videosourcewithcapturer:capturer constraints:videoconstraints]; rtcmediastream *lms = [factory mediastreamwithlabel:@"ardams"]; [lms addvideotrack:[factory videotrackwithid:@"ardamsv0" source:videosource]];
note sends small video, works!
Comments
Post a Comment