I am working on a website in which proper url doesn't show up after copying from the embed button.
On clicking embed button(as shown below in an image), I am getting the following code inside iframe in which the value of src is not correct. It should be a proper video url.
<iframe src="//content.jwplatform.com/players/dalet_clips/35472P.mp4-88sIiZig.html" width="640" height="360" frameborder="0" scrolling="auto"></iframe>
The snippets of code which I am using inside jwplatform.js is:
"sharing": {
"code": "%3Ciframe%20src%3D%22http%3A//content.jwplatform.com/players/MEDIAID-6gKQPrHW.html%22%20width%3D%22480%22%20height%3D%22270%22%20frameborder%3D%220%22%20scrolling%3D%22auto%22%3E%3C/iframe%3E",
"link": "http://content.jwplatform.com/previews/MEDIAID-6gKQPrHW"
},
Problem Statement:
Inside iframe src, I am getting the following code //content.jwplatform.com/players/dalet_clips/35472P.mp4-88sIiZig.html
which is not correct. It should be proper url of the video. I am wondering what changes I need to do so that I get the complete video url inside iframe src.
EMBED is basically the same as IFRAME, only with fewer attributes. Formally, EMBED is an HTML 5 tag, but on several browsers it will also work for HTML 4.01, if you are using this. It just cannot be validated. As always HTML 5 is recommended for the pages.
The most direct way to do what you want is to have your server give you a complete page that only contains the fragment you want to show. As an alternative, you could just use a simple <div> and use the jQuery "load" function to load the whole page and pluck out just the section you want: $('#target-div').
Most probably web site that you try to embed as an iframe doesn't allow to be embedded. You need to update X-Frame-Options on the website that you are trying to embed to allow your Power Apps Portal (if you have control over that website).
If the primary domain for your website is secure with SSL (https://) but the source URL for your Iframe is not, your website will display an error, or simply not display the content. To fix this, you'll need to update the Source URL for your Iframe content with the secure (https://) version.
Try changing the code
property in the sharing
option in jwplatform.js
to encodeURIComponent
of whatever you want to be the exact iframe
content
Example:
now you have the code
as %3Ciframe%20src%3D%22http%3A//content.jwplatform.com/players/MEDIAID-6gKQPrHW.html%22%20width%3D%22480%22%20height%3D%22270%22%20frameborder%3D%220%22%20scrolling%3D%22auto%22%3E%3C/iframe%3E
Now try to decode this with decodeURIComponent(code)
which evaluates to :
<iframe src="http://content.jwplatform.com/players/MEDIAID-6gKQPrHW.html" width="480" height="270" frameborder="0" scrolling="auto"></iframe>
You should try changing both code
and link
to your actual video link and code. just encode whatever content you want to be as code with encodeURIComponent
or test the current one with decodeURIComponent
, also keep the correct link in the link
property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With