Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7.2
-
Windows 10 22H2, Emscripten 3.1.25, Google Chrome 127.0.6533.72 + Mozilla Firefox 128.0
-
-
680304a0e (dev), 7ec4d1b9f (6.8), 6a866de06 (6.7)
Description
Code
import QtQuick import QtMultimedia import QtQuick.Controls.Basic Window { width: 640 height: 480 visible: true component Player: VideoOutput { id: videoOutput Button { text: player.playing ? "Stop" : "Play" onClicked: { if (player.source == '') player.source = "video.mp4" if (player.playing) player.stop() else player.play() } } MediaPlayer { id: player videoOutput: videoOutput } } Column { anchors.fill: parent Player { width: parent.width height: parent.height / 3 } Player { width: parent.width height: parent.height / 3 } Player { width: parent.width height: parent.height / 3 } } }
Steps to reproduce
- Build and run the attached project
- Wait a few seconds, then click the top button
- Wait a few seconds, then click the middle button
- Wait a few seconds, then click the bottom button
- Reload the page, and repeat steps #2-#4 in the reverse order
Expected outcomes (Windows)
All 3 videos play independently all the time
Actual outcomes (WASM)
All 3 audio streams play independently as expected, but...
- In the "forward" test, all 3 video outputs display the same thing as the top frame.
- In the "reverse" test, the bottom 2 frames show nothing. Only the top frame plays as expected.
Google Chrome 127.0.6533.72 reports the following exception in the "reverse" test (but Mozilla Firefox 128.0 doesn't):
Uncaught DOMException: Failed to construct 'VideoFrame': Invalid source state at methodCaller<(emscripten::val) => emscripten::val> (eval at newFunc (http://localhost:30000/appMultiVideoStudy.js:5570:22), <anonymous>:5:12) at __emval_call (http://localhost:30000/appMultiVideoStudy.js:6175:9) at appMultiVideoStudy.wasm.emscripten::val emscripten::val::new_<emscripten::val&>(emscripten::val&) const (http://localhost:30000/appMultiVideoStudy.wasm:wasm-function[6974]:0x28b844) at appMultiVideoStudy.wasm.QWasmVideoOutput::videoFrameCallback(emscripten::val, emscripten::val) (http://localhost:30000/appMultiVideoStudy.wasm:wasm-function[35647]:0xb478f4) at appMultiVideoStudy.wasm.emscripten::internal::Invoker<void, emscripten::val, emscripten::val>::invoke(void (*)(emscripten::val, emscripten::val), emscripten::_EM_VAL*, emscripten::_EM_VAL*) (http://localhost:30000/appMultiVideoStudy.wasm:wasm-function[34314]:0xad44d4) at qtVideoFrameTimerCallback (eval at newFunc (http://localhost:30000/appMultiVideoStudy.js:5570:22), <anonymous>:9:1) methodCaller<(emscripten::val) => emscripten::val> @ VM63:5 __emval_call @ appMultiVideoStudy.js:6175 $emscripten::val emscripten::val::new_<emscripten::val&>(emscripten::val&) const @ appMultiVideoStudy.wasm:0x28b844 $QWasmVideoOutput::videoFrameCallback(emscripten::val, emscripten::val) @ appMultiVideoStudy.wasm:0xb478f4 $emscripten::internal::Invoker<void, emscripten::val, emscripten::val>::invoke(void (*)(emscripten::val, emscripten::val), emscripten::_EM_VAL*, emscripten::_EM_VAL*) @ appMultiVideoStudy.wasm:0xad44d4 qtVideoFrameTimerCallback @ VM39:9
Attachments
For Gerrit Dashboard: QTBUG-127494 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
582011,5 | wasm: fix playing multiple videos at once | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
585238,2 | wasm: fix playing multiple videos at once | 6.8 | qt/qtmultimedia | Status: MERGED | +2 | 0 |
585344,2 | wasm: fix playing multiple videos at once | 6.7 | qt/qtmultimedia | Status: MERGED | +2 | 0 |