Ruby on Rails Wednesday, May 28, 2014

Understood...

Here is some pure js that I substituted into the file as well and it
does not render either.



var endtime = 10505.89+10;
myPlayer= document.getElementById('example_video_1');
myPlayer.addEventListener('loadeddata', function(){
example_video_1.currentTime = 10505.89;
example_video_1.play();
myPlayer.addEventListener('timeupdate', function(){
if (example_video_1.currentTime >= endtime) {
example_video_1.pause();
}

}, false);

}, false);


My question is, how do I get that elementID through my view back to
this js file?

The video ID is instantiated when I call the video tag in my view

<video id="example_video_1" class="video-js vjs-default-skin" controls
preload="auto" width="640" height="264"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup="{}">

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2b4ac0090800a8b4a3dbf8b2182f3878%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment