Believe it or not I'm still fighting with this thing in the rails
context.
This js works PERFECTLY within its own flat file outside of rails.
However when I try and incorporate it into rails the video starts right
from the beginning, I know someone must have solved this one at some
point:
Walter...I tried my best to get this to some public location to no
avail.
at this point I changed everything to myPlayer
var endtime = 10505.89+10;
myPlayer= document.getElementById('example_video_1');
myPlayer.addEventListener('loadeddata', function(){
myPlayer.currenttime = 10505.89;
Wow...I was very close. my issue was currentTime vs currenttime. A
Captial-T was the answer to all my woes.
The lower-case t created a new function (currenttime) that it seemed to
have no idea what to do with other than put the value in it that I
passed.
Any who on to the next challenge.
I have a variable created by some ruby in my controller that looks like
this:
@begpoint = row[begpoint]
and I want to pass it into some js that is referenced from within my
view:
view:
% javascript_include_tag play_time %
js (play_time):
I am trying to pass beg-point into the js
I tried copy/pasting a sample video.js script straight from tutorial in
a js file titled play_time.js in /assets/javascript that looks like
this:
!doctype html
head
titleVideo.JS Example/title
link href=//vjs.zencdn.net/4.1/video-js.css rel=stylesheet
script
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;
Walter...thanks for your responses!
Do I not already have that here:
myPlayer.addEventListener('loadeddata', function(){...
??
For the record the javascript that i have written there works great
within its own flatfile. I just can't get it to render within rails so
I know the code works...
Thanks so much for that feedback. The ONLY reason why I needed to use
videojs is so that I can start and end at a specific time within a
video. Does the built in rails paradigm have this option?
example code:
var endtime = 10505.89+10;
myPlayer=
I am trying to get videojs to play a local video file within rails.
I am using the video.js library
I have tried 2 different gems (github: seanbehan/videojs and
alexesDev/videojs)
I have tried in line javascript
I have tried precompiling the video as an asset by placing in
I have a trivial question:
if i have defined something in my controller, like
def calendar
my_time = Time.now
end
how do I use that variable in my view?
I tried %= my_time %
But that simply returns an error.
Thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this
Javier Quarite wrote in post #1092882:
On Sat, Jan 19, 2013 at 6:44 PM, Pierre-Andre M.
li...@ruby-forum.comwrote:
I have a trivial question:
if i have defined something in my controller, like
def calendar
my_time = Time.now
end
That variable only works on that method, you
That worked great Glen! Thanks so much for your help
--
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 post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from
Perfect Todd. I did miss that part. Thank you
--
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 post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this
I keep getting an error when I attempt to install rails. Yes,
command-line tools is installed.
$ sudo gem install rails
Password:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
I appreciate the quick response, but as I mentioned in my initial
question, commandline-tools (the suite in xcode that is relevant) is
installed. In addition, xcode is also installed. However I am still
getting the afore mentioned error.
--
Posted via http://www.ruby-forum.com/.
--
You
15 matches
Mail list logo