html5-video

How to stream mp4 videos from Django 3 to Vue.js

萝らか妹 提交于 2020-06-23 16:04:33
问题 I'm trying to load a mp4 video stream from Django to Vue.js. I followed the solution here and got a byte string via my axios API which I concatenated to data:video/mp4;base64, , and then binded it to the video tag's :src property, but the video is not displaying. Is this the correct way to stream videos from Django 3 to Vue.js? What am I doing wrong? Api.js code snippet: import axios from 'axios' export default () => { return axios.create({ baseURL: `http://127.0.0.1:8000/`, headers: {

Flex-Grow div with Video tag growing to include header size when 'DOCTYPE html' included

不想你离开。 提交于 2020-06-17 15:55:19
问题 I am using Chrome 81, latest. I am including a <video> inside a <div> container which is set to flex-grow: 1. The idea is there is a header, and the bottom of the page fills to be the video, which will be contained the best possible. The strange problem is that when the window shrinks vertically and when the full picture size fits the window a scrollbar appears and grows until the size of the header is contained by the scrollbar. Once the header is contained in the scrollbar, the video also

How to distinguish between two “onpause” events - caused by clicking “pause” button, and caused by reaching the end of a media fragment?

孤街浪徒 提交于 2020-06-12 02:48:49
问题 If the user wants to stop the HTML5 media, for example by clicking “pause” native control button, we get "onpause" event. At the same time, if media element reaches the end of the specified fragment, it triggers the same "onpause" event automatically. Is it possible to separate one from another? In JQuery style, <video id="video1" src="url/video.webm#t=10,20" controls></video> <script type="text/javascript"> $(window).load(function () { $('#video1').on("manualpause", function () { alert("you

How to distinguish between two “onpause” events - caused by clicking “pause” button, and caused by reaching the end of a media fragment?

Deadly 提交于 2020-06-12 02:48:26
问题 If the user wants to stop the HTML5 media, for example by clicking “pause” native control button, we get "onpause" event. At the same time, if media element reaches the end of the specified fragment, it triggers the same "onpause" event automatically. Is it possible to separate one from another? In JQuery style, <video id="video1" src="url/video.webm#t=10,20" controls></video> <script type="text/javascript"> $(window).load(function () { $('#video1').on("manualpause", function () { alert("you

MP4 not working on mobile devices after change source parameter

谁都会走 提交于 2020-06-01 06:44:25
问题 I have a strange problem. On a website for my client, I'm showing some mp4 files using the HTML5 video element. The videos that are visible on the page while loading do show up on mobile devices without any problems. When I try to change the source of a video element (after an AJAX request), the video element shows a black screen. The new video source I changed could be exactly the same as one that was already shown on page load, but after updating the src parameter it just won't show..

openCV - ffmpeg H264 and Webm error

你离开我真会死。 提交于 2020-05-28 14:22:38
问题 I have ubuntu 16.04 LTS and OpenCV 3.4.0 Installed(Intel i5 and AMD graphics card), I need to create a browser supported video, which is playable in browser. If I'm using H264 im getting OpenCV: FFMPEG: tag 0x34363248/'H264' is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1' [h264_nvenc @ 0x7f4e0407f5e0] Cannot load libcuda.so.1 Could not open codec 'h264_nvenc': Unspecified error if I'm using webm VP8 OpenCV: FFMPEG

openCV - ffmpeg H264 and Webm error

别等时光非礼了梦想. 提交于 2020-05-28 14:19:10
问题 I have ubuntu 16.04 LTS and OpenCV 3.4.0 Installed(Intel i5 and AMD graphics card), I need to create a browser supported video, which is playable in browser. If I'm using H264 im getting OpenCV: FFMPEG: tag 0x34363248/'H264' is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1' [h264_nvenc @ 0x7f4e0407f5e0] Cannot load libcuda.so.1 Could not open codec 'h264_nvenc': Unspecified error if I'm using webm VP8 OpenCV: FFMPEG

Create webm video blob from series of ArrayBuffer

ぐ巨炮叔叔 提交于 2020-05-24 05:07:48
问题 Here's my code to capture video stream and encode to webm (Using https://github.com/GoogleChromeLabs/webm-wasm): async function captureWebm() { console.log("Started webm capture") worker.postMessage("./webm-wasm.wasm"); await nextEvent(worker, "message"); console.log('webm worker loaded') worker.postMessage({ width: w, height: h, timebaseNum: 1, timebaseDen: 30, bitrate: 1500, realtime: true }); let encodeWebm = async function() { mCtx.drawImage(player, 0, 0, w, h); const imageData = mCtx

Media error: Format(s) not supported or source(s)

只谈情不闲聊 提交于 2020-05-17 07:47:05
问题 I am using media player js for my video, I am trying to play hls and dash video format in both ios and android. Here is what I have so far. Live demo code pen: live demo HTML <div class="video"> <video id="player1" muted autoplay controls preload="none"> source src = "//r.dcs.redcdn.pl/hls/o2/Allegro/vod/1af1b7ee-f87b-4e55-b50f-ac9d7f3e2647/playlist.smil/playlist.m3u8" type = "application/x-mpegURL" data - quality = "SD" > Here is JS $('video').mediaelementplayer({ features: ['playpause',

JavaScript - How can I play multiple videos at once?

帅比萌擦擦* 提交于 2020-05-13 18:55:09
问题 I have an array of video elements that I wish to play at the same time. The only way I've found online that I could do this would be to use new MediaController(); but that doesn't seem widely/if at all supported. What I was expecting to do was: var videos = document.querySelectorAll('video'); var mc = new MediaController(); video.forEach(function(el) { el.controller = mc; }); mc.play(); The only way I've found to do this is doing a forEach on the array and playing them one after another, but