Monday, 9 September 2013

video.js unable to read local videos

video.js unable to read local videos

I've a little video.js player and i'm new to web devlopment. I want it to
read my local videos but i've a message: "Sorry no compatible source and
playback technology were found for this video."
But: If i use the external link given by video.js as sample, i can read
the video.
I downloaded some samples to try out. An OGV one worked on the website i
downloaded it. But when i try with my own, it doesn't work and show the
same error.
Here is the .jsp code :
<div id="videoPlayer">
<video id="videoClip" class="video-js vjs-default-skin"
controls preload="auto" width="640" height="360"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup='{"example_option":true}'>
<source
src="/home/ogda/Bureau/war/src/main/resources/small.ogv
type=video/ogg" />
</video>
</div>
<script type="text/javascript" language="javascript">
var videoPlayer = videojs("videoClip");
videoPlayer.on("pause", changeVideo);
//videoPlayer.src("/home/ogda/Bureau/war/src/main/resources/lol.mp4");
videoPlayer.play();
</script>
Thank you !

No comments:

Post a Comment