Sample site url we created and having the issue mentioned below : https://jdcash711.wixsite.com/website
We are creating a video hosting site using azure. Since the videos we intend to propagate are private mixed with public, we have decided to use encryption(Widevine and Playready) and a log in system. Since we also have public videos, we provided users to create an embed URL for the videos. We a We facilitated this using a document id and a view that is publicly accessible and this view will be in the embed URL. When a request with the valid document id reaches this view, we call another view with the credentials for decrypting that video. In this view the video is played using azure media player. All this is working in most sites but for some sites especially websites created using Wix,Strikingly and Godaddy , it shows the below error:
Encrypted Media access has been blocked because of a Feature Policy applied to the current document.
I have already added the allow=“encrypted-media” permission in the embed code, but of no use.
I am also getting this error code - error: videojs: 2.2.4.1 (CODE:273678337 undefined) [object Object]
Has anyone run in to a similar situation and found a solution for the same? If so please do help.
We tried adding the feature policy to the http headers in our site and also checked the feature policy of the websites we created using the website builders and found that both our site and the sites generated using the website builder tools have ‘encrypted-media’ in the allowed list. The video is still showing the ‘unable to decrypt’ message with error code : 273678337
Would there be any reason why it is so?
The result of document.featurePolicy.allowedFeatures(); for the site created using Godaddy is given below :
0: “geolocation”
1: “accelerometer”
2: “midi”
3: “focus-without-user-activation”
4: “camera”
5: “usb”
6: “magnetometer”
7: “payment”
8: “picture-in-picture”
9: “fullscreen”
10: “vr”
11: “document-domain”
12: “encrypted-media”
13: “autoplay”
14: “ambient-light-sensor”
15: “gyroscope”
16: “sync-xhr”
17: “microphone”
The result of document.featurePolicy.allowedFeatures(); at the iframe level for our site is given below:
0: “focus-without-user-activation”
1: “picture-in-picture”
2: “document-domain”
3: “encrypted-media”
4: “sync-xhr”
Important:
Wix cannot provide support for external codes that were not created or tested with Wix. If you are experiencing an issue with your code snippet, please contact the provider directly.
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site
https://developers.google.com/web/updates/2018/06/feature-policy
Hi, the issue is not because of the external code, since we are able to play the same embedded code in other domains. Here is the sample site we created - https://febiniv7.wixsite.com/mysite
We have added the sandbox parameters you have mentioned but of no use. The issue is visible only in chrome. The difference we found in our analysis, between chrome and other browsers is the feature policy. This supported only in chrome. It stays if feature policies are set in the hosting site and in the iframe the more restrictive one wins. In our iframe we have set the ‘allow-encrypted-media’ attribute set to all sites. Hence the hosting site in this case - https://febiniv7.wixsite.com/mysite should also have the ‘allow-encrypted-media’ attribute set to all sites which is not the case i guess. This can be resolved at your end since you hold the wix domain configuration. Is it possible for you to set it so.
Another website we created is : https://jdcash711.wixsite.com/website
This one also has the same issue.
Firstly, I do hope that somebody at Google can help you with this issue as it is directly concerning only their own browser itself. https://support.google.com/chrome/thread/16291499?hl=en
Yes I can see that it has an issue with working on Google Chrome as I’ve just tried both sites myself and I get the error message too in Chrome whereas it works fine in Firefox etc.
However, when you look at this test video from them it loads up fine in Chrome.
https://amp.azure.net/libs/amp/latest/samples/dynamic_multiDRM_PlayReadyWidevineFairPlay_notoken.html
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Azure Media Player</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--*****START OF Azure Media Player Scripts*****-->
<!--Note: DO NOT USE the "latest" folder in production. Replace "latest" with a version number like "1.0.0"-->
<!--EX:<script src="//amp.azure.net/libs/amp/1.0.0/azuremediaplayer.min.js"></script>-->
<!--Azure Media Player versions can be queried from //aka.ms/ampchangelog-->
<link href="//amp.azure.net/libs/amp/latest/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet">
<script src="//amp.azure.net/libs/amp/latest/azuremediaplayer.min.js"></script>
<!--*****END OF Azure Media Player Scripts*****-->
</head>
<body>
<h1>Sample: DRM - PlayReady, Widevine, and FairPlay (no token)</h1>
<video id="azuremediaplayer" class="azuremediaplayer amp-default-skin amp-big-play-centered" tabindex="0"> </video>
<div id="copyrightInfo" class="muted">
Sintel video - © copyright 2008, Blender Foundation | <a href="https://durian.blender.org/" target="_blank">durian.blender.org</a>
</div>
<script>
var myOptions = {
autoplay: true,
controls: true,
width: "640",
height: "400",
poster: ""
};
//note: we have not included an actual certificate URL to demo, but you will need to link your own hosted .der
var myPlayer = amp("azuremediaplayer", myOptions);
myPlayer.src([{ src: "//ampvideos.streaming.mediaservices.windows.net/9b77ed82-94af-41bc-b08b-537e7a530eb6/sintel_trailer-1080p_fp.ism/manifest", type: "application/vnd.ms-sstr+xml", protectionInfo: [{ type: "PlayReady" }, { type: "Widevine" },{ type: "FairPlay", certificateUrl: "//yourdomain/fairplay.der" }] }, ]);
</script>
<p><b>Note:</b> to run this sample on Safari, developers need to replace the certificate referenced in the code with a proper certificate.</p>
<footer>
<br />
<p>© Microsoft Corporation 2016</p>
</footer>
</body>
</html>
Have you read their own pages like these.
https://social.msdn.microsoft.com/Forums/azure/en-US/4c5725a8-4bae-4186-9fc1-45eca153dede/azure-media-player-error-quotunable-to-decrypt-encrypted-video-source-0x20500004quot?forum=MediaServices
Also, have a read here.
I am not sure this is a chrome specific issue. Now it is, but, if the issue causing the playback problem is in fact feature-policy configuration, all other browsers are scheduled to implement the same in future, at least It is said so in many chats and docs.
Regarding the video that worked for you, i was able to play it in the https://ampdemo.azureedge.net with out any issues, that is with out the advanced options turned on(this is where you set the key for decrypting encrypted videos). This means the video even though it says is encrypted it works like an unencrypted video. Regardless this video works with out a token and ours works with a token for decryption.
As far as azure is concerned the issue is not related to them. Encrypting videos using DRM is a standard procedure and it works well in our actual site. The only place it is not working is when we use site builders like yours and tries to host our site in an iframe. That too in Chrome alone.
https://social.msdn.microsoft.com/Forums/en-US/5db76465-e479-45d5-a7bb-069dae27e7bb/unable-to-play-encrypted-video-in-iframe-in-chrome-firefox-and-edge-can-play-the-same-iframes-with?forum=MediaServices
Thus since it is not working in iframe alone, we will have to assume the issue lies in the hosting site, in this case https://febiniv7.wixsite.com/mysite . Is there any settings in wix to change the feature policy of the site we build? If this is not available in free account, that is okay. Our client has already bought some paid accounts. So let us know.
It will be interesting to see if you get a reply back from Google Support themselves regarding the issue as stated in that page, as it does seem to be just defined to them only.
I think Chrome team should be involved in this case. I saw that this issue has been submitted to Chrome [Support: Unable to play azure encrypted video in iframe in chrome. Firefox and edge can play the same. - Google Chrome Community ](Support: Unable to play azure encrypted video in iframe in chrome. Firefox and edge can play the same. - Google Chrome Community )
Just to make sure this issue is only related to DRM protected content: unprotected/open content works in all the above scenarios (Wix, GoDaddy, etc.)?
Also, just to note, that all of us Corvid Forum Ninjas don’t actually work for Wix, we are just normal everyday people like yourself who comes on here in our own free time to help other users and to help aide the actual Wix Admin and Mods of this Wix Corvid Forum itself when they are busy and off doing other projects etc.
Only the Wix Admin/Mods have the permissions to check any Wix Editor URL links added here too, so no security compromise either.
Anyways, thanks for the update info about the video that was linked, it is good to understand the reasons why that played and yours didn’t as I am not a Microsoft Azure user so can only go on what I see myself.
As stated before too, Wix themselves would probably say that they won’t provide support for your code as it is from a third party and will tell you that it is a Google issue.
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site
So, it seems that Wix and Google (and any others possibly) need to have a chat with each other to see if this can get sorted out between themselves.
Hopefully the Wix Admin/Mods read this post and have a say about it too, cross fingers they might even be able to give you a working solution that I am completely forgetting about right now!
@yisrael-wix
@brett-haralson
@giedrius-grazevicius
Just a thought about being free sites, have a look at the link from previous as it does mention about things being sandboxed etc for free users.
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site
Some sites have security policies that forbid them from being embedded on external platforms (such as Wix). These sites might not appear in the Editor or live site after you have pasted the link or code into the HTML element.
Limitations
Code within the HTML element is displayed on your live site within a sandboxed iFrame. Using a sandbox protects visitors to Wix sites from potential side-effects of custom HTML/JS/CSS code.
//…//
Important:
Premium sites are not sandboxed.
Okay, we did create a paid site to test this out and the video is still having issues.
Here is the site : https://www.tourit.us/embed-test
This is the url used for embedding in the site - https://test.letmetourit.us/MediaLibrary/Hotspot/LoadVideoHotspotEmbed?encDocID=3WJCKceP3ntzwhcR1XwUEQ%3D%3D
The video played okay even in chrome if we go to the link directly.
We checked using non DRM content and the video is playing well in all scenarios. Only DRM encrypted videos embeded in Iframes have this issue.
As far as we know this is because of feature policy restrictions(which is active in chrome alone) and as per the documentations the more restrictive feature policy is used for Iframe content. In this case an encrypted video. If the Wix team can update the feature policy configuration ‘encrypted-media’ to ‘*’(allow all), we believe this issue will be resolved.
Also this is not a Google issue since this is a restriction that is set to be implemented in all browsers. Google just happened to implement it first. We had asked the query in Chrome support just to confirm this. But so far no one has responded.
Hi, In our recent testing the issue persists only in Wix. We found Godaddy and Strikingly was working correctly if we created https sites. Thank you Givemeawhisky for all your help. I don’t think the admins of Wix has noticed this issue even after you mentioned them in you post. Hence we have decided not to use Wix anymore.