0

My requirement is to play a flash video (flash plugin is installed in the browser).

I have written the code by referring to how to play flash(.flv) video using video.js in chrome

But it's not working for me, the problem I observed is src tag is not getting replaced with obj (its happening in their case).

Can any one help me to understand what I am missing

My code:

<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="400px" height="268" data-setup='{"techOrder": ["flash", "html5"]}'>
        <source src="http://www.mediacollege.com/video-gallery/testclips/20051210-w50s.flv" type='video/x-flv'>
        <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
</video>
Community
  • 1
  • 1
kalki
  • 465
  • 7
  • 14
  • Is this solved now.?.. If not, then can you provide a link to your page so we see the problem in action? Also what's your browser & OS? – VC.One Apr 14 '16 at 09:21

1 Answers1

1

I tried the code from your reffered link and it worked for me in Chrome browser (Windows).

Here is a quick demo example. The source code for that demo page is below. Compare with your own page code to see what could be wrong.

<!DOCTYPE html>
<html>

<head>

<meta charset=utf-8 />

<title> Example - Video.js </title>

<link href="http://vjs.zencdn.net/4.7/video-js.css" rel="stylesheet">

<script src="http://vjs.zencdn.net/4.7/video.js"></script>

</head>

<body>

<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="268" data-setup='{}'>

<source src="http://www.mediacollege.com/video-gallery/testclips/20051210-w50s.flv" type='video/x-flv'>

</video>

</body>

</html>
VC.One
  • 14,790
  • 4
  • 25
  • 57
  • I tried it (your's and my code as well), its working if I open it as a new page (the code mentioned by you). When I integrated this in my code, Its not working (diff: I am injecting the video tag dynamically). Then I tried creating the player object (via videojs api by passing video id and options), Then Its started working for me. Some how videojs is not picking the video tag to apply changes during first case. – kalki Apr 15 '16 at 07:54