RTCMultiConnection iOS 11 safari audio/video stream issue - ios

I'm using the RTCMulticonnection library for a webrtc video streaming platform. It functions pretty much like this: There's a list of users, each with a profile page that has a chat button. Upon clicking this chat button, the caller is taken into a chat room page (a new browser tab) where he issues a connection.open() to create the room.
Afterwards a chat request is send through the node server to the callee, which gets a confirmation popup. If he accepts he is taken in the chat room page (a new tab) where a connection.join(roomId) is called.
My problem is that on ipad/iphone both the audio AND video stream are added only on the first call, either if you are a caller or a callee. If you afterwards want to call someone else on the ipad only the audio stream is added to the chat view, but from the remote side you get the video stream just fine.
Is there a flag that gets set up somewhere, somehow that I'm missing?
Also there's some cases that causes iOS devices to freeze up pretty bad so that they need a hard reboot, but I haven't pinned down the culprit.
On desktops and android devices the flow seems to work fine... so far.

This is a bug in WebKit:
Safari on iOS11 Freezes when viewing a cropped remote video
Frequent situations where iOS device locks up, requiring a hard reboot when consuming webrtc streams on IOS
It's solved since iOS 11.2.

Related

How to prevent recording of iOS screen using quicktime

So with iOS 8, we can now record the screen of iOS devices. I've searched extensively and cannot find a way to detect, let alone prevent, this recording. The app I'm working on deals with some potentially sensitive information and images and would like to prevent this if at all possible.
Thank you in advance for your responses and insights!
Anthony
Apparently, there is some way to detect whether a display or QuickTime streaming is connected, because the Netflix app will show an error when that is the case (which also means you can't just use an iOS device and stream to your computer to watch it in big). The app works perfectly if QuickTime streaming is off with the cable is plugged in.
Maybe it just detects whether an external display is connected, and screen recording behaves like that, so basically you might have some success with these APIs and notifications.
Also, you could use an encrypted HTTP Live Stream according to Apple which would be blacked out in the stream / the recording.

Issues with Soundcloud iframe and YouTube iframe together

The Soundcloud widget works fine playing multiple tracks in succession. If I then hide that frame, play a youtube video in a youtube iframe, and then switch back to a new track in the Soundcloud widget, it loads but will not play (ignoring the autoplay setting and any widget.play() calls). I had this working on Chromecast with the developer preview SDK and the 1.0 cast receiver but now with the 2.0.0 receiver it's broken. Any ideas how to proceed?
Currently there is no supported mechanism in the SDK to play YouTube videos outside of the YouTube app. Note that in general, applications may not allow other senders launch or control their receiver side, for example Hulu+ may not like it if you wan to write your own app to launch and control that application on your Chromecast; if they decide to allow such model, they need to publish the steps (for example, they can publish their App ID and additional custom data that would link deep into their application). YouTube is no different in that respect.
ok, got this working so hopefully this is useful to others. Assuming only one is active and visible at a time, the trick is to destroy the prior widgets rather than try to reuse them. For YouTube this does not mean reloading the iframe_api but simply calling YTPlayer.destroy() and new YT.Player() next time around. For SoundCloud keep a handle of the iframe and then call iframe.parentNode.removeChild(iframe) to destroy and then create again next time.

Skype Video Call URI

I am working on a simple app that initiates Skype calls.
It successfully initiates Skype audio call using apple's URI scheme
[NSURL URLWithString:#"skype:skype_id?call"]).
But when I try to make a video call using
[NSURL URLWithString:#"skype:skype_id?call&video=true"]
it still initiates audio call and launches Skype but nothing happens after that (no audio call or video call is made). I have seen some posts where people mentioned that they used similar URI for making video calls for Skype in iOS that worked fine before but now it doesn't work.
I should mention that Android version of the app our team is working on have no such issue. It successfully starts making video call using same URI.
Is this a problem of latest version of skype developed for iOS?
this seems to be totally bust in skype for iOS.
even skype://username?call comes up with a fairly unintuitive modal saying "Placing call with..." which does NOTHING unless you click "Voice Call"
All works fine in other systmes / browsers (windows, mac osx, android), though https is bust in chrome. which is just dandy.
maybe https://stackoverflow.com/users/1383154/allen-smith or someone from skypes side can comment??
according to http://handleopenurl.com/scheme/skype you can use skype://username?chat in an html link. Now that sort of works - as in it opens skype, but still doesnt initiate the call.
You can't use the &video=true - IOS doesn't like it. Just use the ?call and it will work the same way it should (as if you appended the &video=true to it) and place a video call if video is available.
The skype stuff is pretty flaky - and my only success has been to use the skype buttons (using the skype-uri.js file and associated javascript for creating the buttons under HTTP (NOT HTTPS). HTTPS tends to break things in Chrome, and a few others.
What I did was sniff for IOS and remove the video=true accordingly so it works fine for all the other browsers too. End of the day, Skype really needs to clean up their act.

Send audio to bluetooth device with AVPlayer IOS

Hey I have a video app which uses AVPlayer, I received an email from a user saying he couldn't use his car's bluetooth anymore since I updated the app some time ago.
Now, I didn't tried to support bluetooth back then, but apparently this functionality came along with MPMoviePlayerController which I used before.
Is there a way to check if there's a bluetooth device connected and to send audio to it?
I've seen this question, but it didn't help, the volume control shows but no button letting me chose the output.
Do I have to do something else in order to use bluetooth as output?
I've only tested with my car's bluetooth, which works with phone calls and also other apps like Viber.

readyState issue with HTML5 video elements on ios safari

It seems on the iPad (iOS v. 5.1.1), Safari does not keep a video element's readyState value according to specification. Even while loading from the video source readyState equals zero.
I've made a demonstration jsfiddle which continuously checks the video's readyState. A funny observation: the readyState changes only after clicking the play button.
Actually, I've expected the readyState to switch to a higher number during loading (as it is the case with all browsers on the desktop I've tested--including Safari.) Is there a workaround? Am I getting something wrong here?
From the Apple developer documentation:
Note: The preload attribute is supported in Safari 5.0 and later. Safari on iOS never preloads.
According to Apple the desired behavior on a mobile device is that loading only starts after you actively request the resource so as to not waste bandwidth or battery.
Regarding your question this means that Apple is adhering to the spec. Since no preload occurs and loading only starts after you click the play button the readyState is zero before that point in time.
However, the video tag has special events which are supposed to give more information than readyState.
onCanplay
onCanplaythrough
onProgress
Again, quoting the Apple developer library (Using DOM Events to monitor load progress)
Note: On the iPad, Safari does not begin downloading until the user clicks the poster or placeholder. Currently, downloads begun in this manner do not emit progress events.

Resources