Quantcast

Video Player embed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Video Player embed

mkavanagh
Hi,

I am trying to embed a video player onto a web page - I have tried a number of things without success.

Using the Adobe JW Player there is some straightforward advice about adding the appropriate javascript to do this on a  web page - here is my attempt:

        <div id="test">
  <p>You need Flash Player
      -installed and JavaScript enabled to play this media.</p>
        </div>
                       
        <script type="text/javascript" src="C:/jwplayer/jwplayer.js"></script>        <script type="text/javascript"> jwplayer("test").setup({ flashplayer: "c:jwplayer/player.swf", file: "C:/grails/HomeVu1/web-app/HomeVu1/Work/HV_movie.flv", image: "C:/grails/HomeVu1/web-app/HomeVu1/Work/HV_0001.jpg", height: 270, width: 480 }); </script>
The flash player fails to appear and I am left with the default message.

Perhaps there is some thing I need to do so that the HTML handles the javascript?

Also how do I get error diagnostics out of this?  I have tried fiddling with the log4j setting in the config.groovy file without success.

Before I tried this  I had tried to use the flashplayer plugin by Paul Fernley but there was a version issue which resulted in a "Configuration Holder deprecated" error, which I struggled to resolve.
 
Thanks in advance for your help and advice.


-Mike
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

Nathan Wells
Do you see anything in your javascript console?

Nathan Wells


On Tue, Oct 23, 2012 at 4:22 AM, mkavanagh <[hidden email]> wrote:
Hi,

I am trying to embed a video player onto a web page - I have tried a number
of things without success.

Using the Adobe JW Player there is some straightforward advice about adding
the appropriate javascript to do this on a  web page - here is my attempt:

        <div id="test">
                <p>You need  Flash Player <http://www.adobe.com/go/getflashplayer>
                -installed and JavaScript enabled to play this media.</p>
        </div>




The flash player fails to appear and I am left with the default message.

Perhaps there is some thing I need to do so that the HTML handles the
javascript?

Also how do I get error diagnostics out of this?  I have tried fiddling with
the log4j setting in the config.groovy file without success.

Before I tried this  I had tried to use the flashplayer plugin by Paul
Fernley but there was a version issue which resulted in a "Configuration
Holder deprecated" error, which I struggled to resolve.

Thanks in advance for your help and advice.


-Mike



--
View this message in context: http://grails.1312388.n4.nabble.com/Video-Player-embed-tp4636854.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

mkavanagh
Hi Nathan,

Where do I  find the javascript console - apologies for my ignorance.

The default message appears on the web page  - that is:

You need Flash Player installed and JavaScript enabled to play this media.


-Mike
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

mkavanagh
Hi Nathan,

Thanks for pointing me to the javascript console .

I've managed to get some diagnostics in Chrome developer mode - the error message being.....

      Failed to load resource: the server responded with a status of 404 (Not Found) - http://localhost:8080/HomeVu1/pictures/jwplayer.js

If I then explicitly put the full local address of the file in I get a different error:

      Not allowed to load local resource: file:///C:/jwplayer/jwplayer.js

Any thoughts?


-Mike
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

Nathan Wells
You'll need to load the js file through the network - security prevents the browser from loading files the way you're attempting. You should be able to put the file into your grails js folder and link the the file that way. Eventually, you might want to consider using the resources plugin to load the JS, or a CDN, depending on how important scalability is to you.

Nathan Wells


On Tue, Oct 23, 2012 at 11:33 AM, mkavanagh <[hidden email]> wrote:
Hi Nathan,

Thanks for pointing me to the javascript console .

I've managed to get some diagnostics in Chrome developer mode - the error
message being.....

      Failed to load resource: the server responded with a status of 404
(Not Found) - http://localhost:8080/HomeVu1/pictures/jwplayer.js

If I then explicitly put the full local address of the file in I get a
different error:

      Not allowed to load local resource: file:///C:/jwplayer/jwplayer.js

Any thoughts?


-Mike



--
View this message in context: http://grails.1312388.n4.nabble.com/Video-Player-embed-tp4636854p4636892.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

Ryan Vanderwerf
In reply to this post by mkavanagh
Try out the gvps plugin, it comes with a working example of a demo file using jw-flv and flowplayer 3.x. It also includes a service that will handle FFW/RW abilities in both jw-flv and flowplayer 3.x  It will also give you a simple taglib to use, as well as transcode your movies into a common flv or mp4 container format.

http://www.grails.org/plugin/gvps


full disclosure I work on the plugin :) It may be overkill for what you need, also jw-flv is a nice wizard on their support page that you can fill in the blanks and it will spit out the javascript to get something minimal working: http://www.longtailvideo.com/support/jw-player-setup-wizard

see the github page https://github.com/rvanderwerf/grails-video under /doc there are slides all about it from SpringOne2GX. Let me know if you run into any problems.


Ryan

On 10/23/2012 12:33 PM, mkavanagh wrote:
Hi Nathan,

Thanks for pointing me to the javascript console .

I've managed to get some diagnostics in Chrome developer mode - the error
message being.....

      Failed to load resource: the server responded with a status of 404
(Not Found) - http://localhost:8080/HomeVu1/pictures/jwplayer.js

If I then explicitly put the full local address of the file in I get a
different error: 

      Not allowed to load local resource: file:///C:/jwplayer/jwplayer.js

Any thoughts?


-Mike



--
View this message in context: http://grails.1312388.n4.nabble.com/Video-Player-embed-tp4636854p4636892.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

mkavanagh
In reply to this post by mkavanagh
Hi Nathan,

I've now managed to get the player appearing on the web page but I am having problems getting it to locate display and play  the video file and image file:

Here is the script....

                <script type="text/javascript" src="http://localhost:8080/HomeVu1/js/jwplayer.js"></script>                <script type="text/javascript"> jwplayer("test").setup({ flashplayer: "http://localhost:8080/HomeVu1/js/player.swf", file: "/Work/HV_movie.flv", image: "http://localhost:8080/HomeVu1/Work/HV_0001.jpg" }); </script>
I have placed the Work folder that contains these video and image files in the HomeVu1 folder alongside the js folder. It can find jwplayer.js and player.swf files in the js folder but not the video or image files in the Work folder.

With console errors:

GET http://localhost:8080/HomeVu1/Work/HV_0001.jpg 404 (Not Found)   :8080/HomeVu1/Work/HV_0001.jpg:1

GET http://localhost:8080/HomeVu1/Work/HV_movie.flv 404 (Not Found) :8080/HomeVu1/Work/HV_movie.flv:1

Thanks again if you can help me.


-Mike
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

changeOver
Hi
Have you able to resolve the problem?
I have a flash file under a folder "swf" which is located in the same level where js,images,icons,css are there.
But the file under swf is not getting picked up. I am getting the same 404 error.
Is there any configuration set up that I have to do?

Thanks
NK
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Video Player embed

mkavanagh

Hi NK,

 

Happy to try and help – let me  have a look at your code that creates the embedded video?

 

-mike

 

From: changeOver [via Grails] [mailto:[hidden email]]
Sent: 08 November 2013 15:39
To: mkavanagh
Subject: Re: Video Player embed

 

Hi
Have you able to resolve the problem?
I have a flash file under a folder "swf" which is located in the same level where js,images,icons,css are there.
But the file under swf is not getting picked up. I am getting the same 404 error.
Is there any configuration set up that I have to do?

Thanks
NK


If you reply to this email, your message will be added to the discussion below:

http://grails.1312388.n4.nabble.com/Video-Player-embed-tp4636854p4651260.html

To unsubscribe from Video Player embed, click here.
NAML

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3426 / Virus Database: 3222/6818 - Release Date: 11/07/13

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

changeOver
I have a swf file (testupload.swf, this a simple flash file) under swf folder. I created "swf" folder under WEB-INF folder (at the same level where css,js,images). When I deploy the "war" file in Tomcat server grails is not able to find that file. I see 404 exception in the browser console(chrome). Strange part it is working if I do run-app from GGTS but if I deploy it as war file in a Tomcat server it is not
WEB-INF
   css
   js
   images
   swf
   
Config.groovy
-------------
grails.mime.types = [
    all:           '*/*',
    atom:          'application/atom+xml',
    css:           'text/css',
    csv:           'text/csv',
    form:          'application/x-www-form-urlencoded',
    html:          ['text/html','application/xhtml+xml'],
    js:            'text/javascript',
    json:          ['application/json', 'text/json'],
    multipartForm: 'multipart/form-data',
    rss:           'application/rss+xml',
    text:          'text/plain',
    xml:           ['text/xml', 'application/xml'],
swf: 'application/x-shockwave-flash' // I added for swf
]

// What URL patterns should be processed by the resources plugin
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*','/swf/*'] //I added swf in the array
   
By default, grails has the structure of css,images,js. I dont know why the new swf folder is not recongnized by grails in war deployment.This could be a like some configuration I am missing for war deployment.


On Mon, Nov 11, 2013 at 7:16 AM, mkavanagh [via Grails] <[hidden email]> wrote:

Hi NK,

 

Happy to try and help – let me  have a look at your code that creates the embedded video?

 

-mike

 

From: changeOver [via Grails] [mailto:[hidden email]]
Sent: 08 November 2013 15:39
To: mkavanagh
Subject: Re: Video Player embed

 

Hi
Have you able to resolve the problem?
I have a flash file under a folder "swf" which is located in the same level where js,images,icons,css are there.
But the file under swf is not getting picked up. I am getting the same 404 error.
Is there any configuration set up that I have to do?

Thanks
NK


If you reply to this email, your message will be added to the discussion below:

click here.
NAML

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3426 / Virus Database: 3222/6818 - Release Date: 11/07/13




If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/Video-Player-embed-tp4636854p4651342.html
To unsubscribe from Video Player embed, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Video Player embed

mkavanagh
In reply to this post by mkavanagh
Hi ,

Not able to help you here - have very limited experience of incorporating grails with tomcat.

My only thought would be to try and create the situation where you can view the final html of the web page so that you can see exactly where it is trying to source the video file from.

But I guess that's fairly obvious.


-mike
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

changeOver
Hi Mike
The difference that I saw in how is it generating the url to find the testupload.swf in local and server 
Local : http://<uri>/static/swf/testupload.swf?preventcache=13245324341213
Server : http://<uri>/swf/testupload.swf?preventcache=13245324341213

For the server "static" key word is missing in the url. I dont know whether that is the cause of the problem.Even if that is the problem I dont know how to make grails to add the "static" in the url. Just in case if something strikes your mind let me know.

Thanks for checking this out.

Thanks
NK


On Mon, Nov 11, 2013 at 2:34 PM, mkavanagh [via Grails] <[hidden email]> wrote:
Hi ,

Not able to help you here - have very limited experience of incorporating grails with tomcat.

My only thought would be to try and create the situation where you can view the final html of the web page so that you can see exactly where it is trying to source the video file from.

But I guess that's fairly obvious.


-mike


If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/Video-Player-embed-tp4636854p4651368.html
To unsubscribe from Video Player embed, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Video Player embed

desicreationz
In reply to this post by Ryan Vanderwerf
I have installed ffmpeg and all the required components.. i just need to know how can i upload and convert videos as well put authorisation on movie domain using spring security?

I am not sure about the process and syntaxes.

 
Loading...