summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2024-03-16 05:58:44 +1000
committerLorn Potter <lorn.potter@gmail.com>2024-04-02 10:22:26 +1000
commitb36b0226dbb82d53f18d4aacf0491a7c0f158d82 (patch)
treed5210e8c377a6ac863e6fc0464858896a52664a7 /src/multimedia
parent221a5fed6f7ebe68b365c068c43c413e3aa3edc7 (diff)
wasm: Update webassembly docs
Remove example code as QVideoWidget now works and there is no need to point out to use QGraphicsView. Mention QMediaDevices signals are used when devices list is ready. Pick-to: 6.7 Change-Id: Ie9eed969d3712e9db9166b8e4deaa68ba85f3b0e Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/doc/src/platform-notes-wasm.qdoc33
1 files changed, 6 insertions, 27 deletions
diff --git a/src/multimedia/doc/src/platform-notes-wasm.qdoc b/src/multimedia/doc/src/platform-notes-wasm.qdoc
index 2e2fe355d..d1a942c9f 100644
--- a/src/multimedia/doc/src/platform-notes-wasm.qdoc
+++ b/src/multimedia/doc/src/platform-notes-wasm.qdoc
@@ -12,12 +12,10 @@ This page covers the availability of Qt Multimedia features on WebAssembly.
Due to the asynchronous nature of javascript, some features such as getting the list of
QMediaDevices, will not be readily available and may take some time to request permissions and
-gather the list of devices.
+gather the list of devices. The audioInputsChanged, audioOutputsChanged and
+videoInputChanged signals from QMediaDevices class will be emitted when they are available.
-Playing video currently works by using an html 2d context, so all operations are on the CPU.
-This also means that only QGraphicsVideoItem/QGraphicsScene will work.
-There is no current support for QMultimediaWidgets / QVideoWidget which uses a webgl
-context to take processing onto the GPU.
+Playing video currently works by using a html 2d context, so all operations are on the CPU.
Performance is acceptable, although there is a copy on every frame, so it may be
less performant than desktop platforms when playing hi-def video.
@@ -30,27 +28,8 @@ of fetching a URL, isn't supported.
Some advanced features may or may not work at this time.
-To set up playing a video file:
-
- QMediaPlayer *player = new QMediaPlayer(this);
- QAudioOutput audioOutput; // chooses the default audio routing
- player->setAudioOutput(&audioOutput);
-
- QGraphicsVideoItem *item = new QGraphicsVideoItem();
- player->setVideoOutput(item);
-
- QGraphicsScene *scene = new QGraphicsScene(this);
-
- ui->graphicsView->setScene(scene);
- ui->graphicsView->scene()->addItem(item);
- ui->graphicsView->show();
-
-and then to play the url:
-
- player->setSource(QUrl(urlStr));
- player->play();
-
-Files can be served from the/any web server. Because of the restriction on local file storage,
-playing local files is discouraged.
+Files can be served from the/any web server, respective
+of \l{https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS}{CORS}. Because of
+the limited size of local file storage, playing local files is discouraged.
*/