-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
iOS video not working: errors with not allowed to load local resource and MediaStream #328
Comments
Hello @cdcv , could you provide more informations ? iOS Version, Actually i had hard times with webRTC at iOS and finally all working :) |
Versions should be close to 'the latest of everything'. |
I have the same issue when I change a front camera to a back one. |
@phillx - Did you ever have a chance to prepare your briefing to this solution? I am really curious about how you got through it. |
Same issue for me |
I have the same error, but I am only using audio Side note: I know the WebRTC connection is working at least one way since I can hear this devices microphone being picked up and broadcast to an Android phone, but the media source from the Android is throwing this error. XCode 9.3 |
@phillx I have the same problem, I would like to know the solution |
This type of problems are not related to the plugin. It is an inherent feature of the Cordova platform iOS. iOS requires you to explicitly allow media sources. Adding "media-src * blob" to the <meta ... > should be sufficient. I would suggest you to close the issue because it is not related to the plugin. |
Hello,
I did this as first obvious step but it did not work.
Any idea how to proceed?
Cheers,
Andrej
…Sent from my iPhone
On 8 May 2018, at 20:54, jjahifi ***@***.***> wrote:
This type of problems are not related to the plugin. It is an inherent feature of the Cordova platform iOS. iOS requires you to explicitly allow media sources.
Adding "media-src * blob" to the <meta ... > should be sufficient.
I would suggest you to close the issue because it is not related to the plugin.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The only advice I can give is whether you are in a framework or not, reach
as far up through the parent as possible before your gum call. In my case
it was top level frame in the DOM before it worked.
…On Wed, May 9, 2018, 7:25 AM Andrej Zachar ***@***.***> wrote:
Hello,
I did this as first obvious step but it did not work.
Any idea how to proceed?
Cheers,
Andrej
Sent from my iPhone
> On 8 May 2018, at 20:54, jjahifi ***@***.***> wrote:
>
> This type of problems are not related to the plugin. It is an inherent
feature of the Cordova platform iOS. iOS requires you to explicitly allow
media sources.
>
> Adding "media-src * blob" to the <meta ... > should be sufficient.
>
> I would suggest you to close the issue because it is not related to the
plugin.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#328 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASr5KSEB575H8S5-iHk0e7Z5wiNrX1nks5twvxogaJpZM4SxQmH>
.
|
This comment was marked as off-topic.
This comment was marked as off-topic.
There are several issues related to this. One is the meta-definition. The second is the requirements of the newest iOS-versions. I have been using a meta like
Yes, I know, not very safe. Actually a real problem. I do not like this either. But it works for me. In the latest versions of iOS the security requirements have been updated into a more strict version. Apparently you need a bunch of inline-statements for video to work. Test with Safari, if it does not work, then you app is not likely to work with this plugin. In order to have a bit mode freedom with the recent constraints I am using a development machine with macOS Sierra and iOS-devices with a bit old version of iOS 11. Do not update it you can survive without it. In addition, I have to point out that the current webrtc support in Safari is not as good as one may assume. Hence this plugin is one of the best possibilities of getting a working solution. Especially in private networks. |
I got it working by following code Put following code in your index.html
And in your ts file, cast the stream as ObjectUrl by following code.
|
Yes, of course, it will work when you turn off CSP. But this is not acceptable on any production ready app, it is super unsafe! |
@azachar is, of course, right. I have found that on iOS it is not intuitively clear with permissions should be given in order to get things working. For that reason I have started to do things in a way that I allow enough things in order to get app working. After that I drop permissions one by one. If things stop working, give the permission back. But try to remove another permission. After a few iterations you will have only the required ones left. Another issue is that the library in the plugin is a bit old. For some functionality the API is not up to date (you have to use deprecated functions). If I have time I will have a look at the possibility of updating the library. |
@azachar The interesting part is that this library worked fine without any CSP specified on the iOS 10 SDK, but is now failing with the iOS 11 SDK. Seemingly, Apple added some new rules that require you to include some CSP, even if it's a relatively useless CSP. |
Has anyone got it working even by using custom tag ? Im stuck with the following error.
|
what actually fixed it for me was changing |
I think the |
@cah-dunn I tried to incorporate this change but it doesn't make the video show. |
@syonip if you're on the latest version (v4.0.2) the You might need to call |
Yes if you have CSP meta or header you may need to add |
We can close this issue cause #270 fix the issue. |
I have followed the instructions provided and created a video chat app. It works correctly in browser and Android cordova.
On iOS cordova, the self-video displays (so webRTC is working somewhat), but peer video does not display (on either the iOS device or a chrome web browser peer that works with non-iOS peers).
The following errors are produced:
Not allowed to load local resource: blob: blobinternal:///59c84caa-3e1c-4a00-91f4-c655a7ce638c
and
TypeError: Argument 1 ('stream') to RTCPeerConnection.addStream must be an instance of MediaStream
I have verified that the various required elements in config.xml, etc are correct.
Thanks for your help.
The text was updated successfully, but these errors were encountered: