Unable to get start time and end time of embedded videos from IFrame - spring-mvc

We are doing a learning web application where we have to show list of videos to user , these videos can be uploaded as embedded URL so when user play the same embedded URL then we are unable to store the values of start , pause and end time of the video, We are using iFrame tag for show videos
Tried to capture the values from iFrame but haven't reach the goal.
searched a lot on net but couldn't get satisfy able content.
<iframe width="670" height="400" id="vid${v.video_id}" src="${v.embedded_url}"></iframe>

try this one.. , just replace "url" from following code to your src url
<iframe width="560" height="315" src="url ?start=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Related

Youtube iframe fullscreen

hope everyone is ok.
I need to build a page in our company's website where we're putting some videos of our production.
The problem is, i can't seem to find a way to make the videos available in fullscreen mode for the visitors.
I've done pratically every solution that i've found, but none seems to work. I've done:
<iframe allow="fullscreen;">
---
<iframe src="your_page_url"
allowfullscreen="allowfullscreen"
mozallowfullscreen="mozallowfullscreen"
msallowfullscreen="msallowfullscreen"
oallowfullscreen="oallowfullscreen"
webkitallowfullscreen="webkitallowfullscreen">
</iframe>
---
allowFullScreen="allowFullScreen" and frameBorder="0"
---
<iframe
id="player"
src="URL here"
allowfullscreen="true">
</iframe>
---
But none of that worked.. Any help here is welcome!
its very easy if you wants to add youtube videos in iframe .you just have to add iframe in src embed word like that
<iframe src="https://www.youtube.com/embed/watch?v=fbS2O4VETAo&t=2s" name="myFrame"></iframe>
after youtube.com/embed/Example url

Youtube Live Chat in Iframe (without API)

How is it possible to put the Youtube Live Chat into an Iframe?
I have this URL, but for me it does not work:
<iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/live_chat?v={VIDEO_ID}&embed_domain={MY_DOMAIN}" width="480"></iframe>
If I open the URL normally in the Browser, I get the chat, but in the Iframe i get nothing.
Please help. Thx :)
You may need to have embedding enabled first, you can check the status of your account at this link after you're logged in the youtube account: https://www.youtube.com/features
Also the domain part (MY_DOMAIN) needs to be without the 'https://' or 'http://' and port numbers like ':3000'
It says it's possible, but only on Desktop browsers:
Note: embedding live chat isn't available on mobile web.
During a live stream, you can embed live chat on your own site by
using an iframe.
Get the video ID for the live stream. You can get the video ID from the watch page URL (youtube.com/watch?v=12345). In this case, the video ID is ‘12345’. If you chose "Stream now," right-click on the player and select Copy video URL to get the video URL.
Get the domain URL for the site you want to embed chat on. If you're embedding chat on www.example.com/youtube_chat, your embedding domain is "www.example.com."
Combine the embedded URL in the following way: https://www.youtube.com/live_chat?v=12345&embed_domain=www.example.com
This is the URL for your iframe. Note the embed_domain must match the URL of the page you’re embedding the chat on. If they are different, the embedded chat will not load.
https://support.google.com/youtube/answer/2524549?hl=en
I made an example with:
<iframe width="560" height="315" src="https://www.youtube.com/embed/5qap5aO4i9A" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="185" height="315" src="https://www.youtube.com/live_chat?v=5qap5aO4i9A&embed_domain=fiddle.jshell.net" frameborder="0"></iframe>
Which looks like this:
View the working demo here:
https://jsfiddle.net/kmturley/9Lmbdgn2/8/

Vimeo iFrame only loads occasionally

This vimeo video loads fine on its own with the iframe snippet below
<iframe src="http://player.vimeo.com/video/19513284?byline=0&portrait=0&color=ffffff" width="350" height="192" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
But once loaded as part of this page, it will only work some of the time. I disabled all applicable CSS rules to that iFrame element, but it still won't load.
This happens on Chrome, Firefox and Safari, cleared cache or not.
Any thoughts?
That's because your site is secure. Browsers have started blocking insecure elements loaded on secure pages. The easiest solution is to remove the "http:" from the src of the iframe:
<iframe src="//player.vimeo.com/video/19513284?byline=0&portrait=0&color=ffffff" width="350" height="192" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
That will load via the proper protocol where necessary. Note that we are still working on getting our video files loading over https, but the embed will still work in the meantime (you'll just see a warning in the address bar in some browsers).
Your iFrame source needs to be https://

Adding the YouTube iframe to a Cordova app on iOS

I'm using Cordova 3.0 and am trying to embed a YouTube video inside an article of my news app. The YouTube code looks like this:
<iframe width="600" height="450" src="//www.youtube.com/embed/_OBlgSz8sSM" frameborder="0" allowfullscreen></iframe>
In its current form the code does nothing except leave a large wide white square in the DOM. When I inject the letters http: so that it looks like this:
<iframe width="600" height="450" src="http://www.youtube.com/embed/_OBlgSz8sSM" frameborder="0" allowfullscreen></iframe>
then the app automatically quits and goes to the browser. How can I just make the iframe behave as it should, as a little window. I have followed the steps mentioned in this question and have tried fiddling with the <preference name="stay-in-webview" value="false" /> line in the config.xml file.
Is this what you are looking for
Force HTML5 youtube video
<iframe src="http://www.youtube.com/embed/_OBlgSz8sSM?html5=1"></iframe>
OR may be
Show Youtube video source into HTML5 video tag?
Step 1: add &html5=True to your favorite youtube url
Step 2: Find tag in source
Step 3: Add controls="controls" to video tag:
<video controls="controls"
class="video-stream"
x-webkit-airplay="allow"
data-youtube-id="N9oxmRT2YWw"
src="http://v20.lscache8.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPRVRMVV9FSkNOOV9MRllD&itag=43&ipbits=0&signature=D2BCBE2F115E68C5FF97673F1D797F3C3E3BFB99.59252109C7D2B995A8D51A461FF9A6264879948E&sver=3&ratebypass=yes&expire=1300417200&key=yt1&ip=0.0.0.0&id=37da319914f6616c"></video>
More SF posts:
YouTube video in HTML5
Force HTML5 youtube video

Invalid Parameters on playing youtube embedded on a website

At first I'm getting this error "This video contains content from sme. It is restricted from playback on certain sites" Then after reading this post I added few lines to my youtube emded url I'm now receiving a new error which says "Invalid Paramaters". By the way what I'm trying to do here is embed a youtube video on my site.
This is the original embed url of the youtube I'm trying to embed on my website. Where I'm receiving the error message "This video contains content from SME. It is restricted from playback on certain sites. Watch on Youtube".
<iframe width="420" height="315" src="http://www.youtube.com/embed/CFqbhsvXE7M" frameborder="0" allowfullscreen></iframe>
This is the editted one after reading the post. And getting this error "Invalid Paramaters".
<iframe width="420" height="315" src="http://www.youtube.com/embed/CFqbhsvXE7M?playlist=." frameborder="0" allowfullscreen></iframe>
I've done some research and it says YouTube indeed has changed their API over the last couple of days and flash fallback from their HTML5 Video Player fails. and I didn't find a clear explanation how to fix it. Using the original embed url the youtube plays well in my localhost. After I deployed it in a server I'm now receiving those errors. Is this something to do with the domain of the server I'm using?
Question:
How could I possibly fix this? T_T
Other Information: I'm using asp.net MVC3
Instead of using embed use watch and add in a few attributes, works all the time:
<iframe width="420" height="315"
src="http://www.youtube.com/watch?v=CFqbhsvXE7M"
frameborder="0"
webkitAllowFullScreen
mozallowfullscreen
allowFullScreen></iframe>

Resources