correct url not showing up in iframe copied from embed button
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.
Probably you are making a mistake when you say that:
//example.com it is not a valid url...
- Nope. It's absolutely valid url. Even, it's better type of url (calledschemeless
url, withouthttp:
prefixing)....there should be video url (mp4) inside SRC...
- No again.iframes
are for web-pages (including.html
pages), or not files (like.mp4
or other file extensions), so that is the correct form of url.
I think your problem is something different:. Maybe that video file is deleted from server? Or something doesn't actually work on that destionation url? Check problems there.
p.s. you should have posted an example url which works (just change domain to example.com
if you dont want to share it).