[Rails] Re: videojs and rails

2014-06-06 Thread Pierre-Andre M.
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:

[Rails] Re: videojs and rails

2014-05-29 Thread Pierre-Andre M.
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;

[Rails] Re: videojs and rails

2014-05-29 Thread Pierre-Andre M.
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.

[Rails] Pass a ruby variable into js within Rails

2014-05-29 Thread Pierre-Andre M.
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

[Rails] Re: videojs and rails

2014-05-28 Thread Pierre-Andre M.
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

[Rails] Re: videojs and rails

2014-05-28 Thread Pierre-Andre M.
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;

[Rails] Re: videojs and rails

2014-05-28 Thread Pierre-Andre M.
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...

[Rails] Re: videojs and rails

2014-05-23 Thread Pierre-Andre M.
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=

[Rails] videojs and rails

2014-05-22 Thread Pierre-Andre M.
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

[Rails] Get vars out of Controller

2013-01-19 Thread Pierre-Andre M.
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

[Rails] Re: Get vars out of Controller

2013-01-19 Thread Pierre-Andre M.
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

[Rails] Re: Getting rails installed on my mac

2012-12-24 Thread Pierre-Andre M.
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

[Rails] Re: Getting rails installed on my mac

2012-12-24 Thread Pierre-Andre M.
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

[Rails] Getting rails installed on my mac

2012-12-23 Thread Pierre-Andre M.
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.

[Rails] Re: Getting rails installed on my mac

2012-12-23 Thread Pierre-Andre M.
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