Вопрос

Hello I'm trying to implement a jwplayer on a website when i tested it local with a single html page everything worked great and here is the working test code:

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>JWPlayer test</title>
   <script src="http://tms.localhost/NSwQRmZDEeOchiIACmOLpg.js"></script>


  </head>
  <body>

  <div id='playeriybxxXWkOtaN'></div>
  <script type='text/javascript'>
      jwplayer('playeriybxxXWkOtaN').setup({
          file: 'http://tms.localhost/video.flv',
          image: 'http://tms.localhost/image.jpg',
          title: 'Razer',
          width: '100%',
          aspectratio: '16:9',
          fallback: 'false'
      });
  </script>

  </body>
</html>

However when i tried to use it through a cms specifically liferay it didn't work. I uploaded a video through the cms control panel and the generated link for the video was:

http://localhost:8080/documents/10180/0/test-video/a3690397-1d28-4225-9a5c-7d13dba7c789 

I assume it has to do something with the link? but when i try it on my browser the video downloads perfectly fine.

What am I doing wrong here ?

Это было полезно?

Решение

check this http://www.longtailvideo.com/support/jw-player/28836/media-format-support

the page says: "The JW Player tries to recognize a file format by its extension (e.g. .mp4 for MP4 videos). If the extension of your files is not recognized, the player will display an error. However, if you know your file is in a supported format, you can use the type playlist option to force the player to recognize the file as being of that format."

In your case the generated link for the video has no extension, so JW Player doesn't know how to play it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top