Following code is working but it is not starting the video from 3 seconds on my page
<video id="vid1" width="320" height="240" controls>
<source src="iphone16.mp4#t=3,9" type="video/mp4">
</video>
I am using Django for development of my web application. Any idea why it's not working in my case??
Thanks in advance
Related
I want to play mp.4 file on my xaringan slide, and I add the following but it won't play. Am I missing something here? Thank you.
<video width="500" height="400" controls>
<source src="music.mp4" type="video/mp4">
</video>
I add file as <audio src="LINK" controls /> to mysql.
When I fetch mysql row it not show audio player but show text <audio src="LINK" controls /> instead of embeded audio player
I have trouble when setting embed data for Vimeo on Squarespace.
I have set the iframe code with autoplay = 1 and muted=1 and it works fine on mobile. When I play the video on mobile, it will show the button tap to unmute the video.
However, on the desktop, the video only shows the button to play/pause and has no button to unmute it.
Is there anyone getting into this trouble and do you have any solution for it?
Thanks!
try this might be helpful for you
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
player.on('play', function() {
console.log('video played');
});
<!DOCTYPE html>
<html>
<head>
<title>Iframe video Test</title>
</head>
<body>
<iframe id="vidz" src="https://player.vimeo.com/video/401649410?h=11d74aa27c&portrait=0" width="450" height="253" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen=""></iframe>
<script src="https://player.vimeo.com/api/player.js"></script>
</body>
</html>
Video js is not working in chrome (latest version) with django 1.8. It is working well in firefox and IE. In chrome, video is playing well but when i click on the scrum to forward and backward video, video restarts again. I also tried with CDN but It result same:
<video id="ml_video" class="video-js vjs-default-skin" controls preload="auto" data-setup="{}" width="100%" height="400px" src="{{ mn_video.url }}">
<source src="{{ mn_video.url }}" type='video/webm'></source>
<source src="{{ mn_video.url }}" type='video/mp4'></source>
<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>
NOTE:
I tried it with django development server as well as with gunicorn.
I do not get any error in console as well as in terminal.
How would you embed a static file with .m4v extension , M4V is a file format,
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="256" >
<param name="src" value="/static/example.m4v">
<param name="autoplay" value="false">
<param name="controller" value="true">
<embed src="/static/example.m4v" type="video/mp4" width="320" height="256" controller="true" controls="true" autostart="false"/>
</object>
The above example forces it to download.
http://django-embed-video.readthedocs.org/en/v0.11/index.html only works with online sites like youtube, few others.
I was struggling with this same issue. I pretty much copied the code from http://camendesign.com/code/video_for_everybody.
<!-- first try HTML5 playback: if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise -->
<!-- warning: playback does not work on iOS3 if you include the poster attribute! fixed in iOS4.0 -->
<video width="640" height="360" controls>
<!-- MP4 must be first for iPad! -->
<source src="__VIDEO__.MP4" type="video/mp4" /><!-- Safari / iOS video -->
<source src="__VIDEO__.OGV" type="video/ogg" /><!-- Firefox / Opera / Chrome10 -->
<!-- fallback to Flash: -->
<object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
<!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
<param name="movie" value="__FLASH__.SWF" />
<param name="flashvars" value="controlbar=over&image=__POSTER__.JPG&file=__VIDEO__.MP4" />
<!-- fallback image. note the title field below, put the title of the video there -->
<img src="__VIDEO__.JPG" width="640" height="360" alt="__TITLE__"
title="No video playback capabilities, please download the video below" />
</object>
</video>
<!-- you *must* offer a download link as they may be able to play the file locally. customise this bit all you want -->
<p> <strong>Download Video:</strong>
Closed Format: "MP4"
Open Format: "Ogg"
</p>
Then made sure to create .htaccess file with the following:
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
Also, I'm using an older version of django (1.6.5) for my project and I have my videos stored at my MEDIA_ROOT and have the MEDIA_URL also set in the settings.py so that the source of video looks like:
{{ MEDIA_URL }}/media/videos/video.m4v