Commit Graph

7 Commits

Author SHA1 Message Date
Dheerendra Purohit 303c85a782 Use QML_ELEMENT macro instead of qmlRegister* for mediaplayer
Updated the MediaPlayer example to use compile-time QML registration via
the QML_ELEMENT macros instead of qmlRegisterSingletonType. This aligns
the example with modern Qt 6 best practices and improves startup
performance and tooling integration.

Pick-to: 6.9 6.8
Task-number: QTBUG-136712
Change-Id: Id34670f4d45200b9a1424612f5a05bebead0a60e
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2025-05-30 10:16:03 +05:30
Bartlomiej Moskal 252e19f0c7 MediaPlayer demo: Add FileNameProvider for PlayList
There is an issue on Android where QFileDialog does not return real
filenames. Instead, it returns content URIs that do not seem appropriete
for displaying in playlist.

To ensure that filenames are displayed correctly, we need to use
QFileInfo. Since there is no QML type for QFileInfo, additional
FileNameProvider singleton type has been registered for QML use.

Fixes: QTBUG-122273
Pick-to: 6.7 6.5
Change-Id: Ib6bd152856a6979788bcbb203d58a38810ea0682
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-04-16 18:19:34 +00:00
Assam Boudjelthia 4ebeb2ddcd Small fixes media player example on Android
* Explicitly link to MediaPlayer module so it gets packaged to the APK.
* Allow the example to user nameFilters after the fix
0f4181919663e85ddc142456b357dcde3d0a4a7f.

Pick-to: 6.6
Change-Id: I16c2feccb90ce7448ae24d03868fbedf3c449e66
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-08-28 11:39:36 +03:00
Friedemann Kleint 5462256d17 MediaPlayer demo: Create a loadable module
Establish a common file layout allowing
Python and C++ to use loadFromModule().

Add a manually created qmldir file for usage by Python and the qml tool
(note CMake will still generate its own).

Pick-to: 6.6
Task-number: PYSIDE-2206
Change-Id: Idf2564ed84bd6c95e76dacdfbc0a9691c64e5f15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-07-28 10:49:16 +02:00
Friedemann Kleint e6459c530f MediaPlayer example: Add filters to the file dialog
Add filters and pre-select MP4.

Pick-to: 6.6
Change-Id: I36d47602607a0201631b0c948efbaa8f3b3cb3d2
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-06-29 16:21:31 +02:00
Friedemann Kleint 943ec55d78 MediaPlayer example: Handle the command line argument "source"
Make it a required property which is always set with a check.

Pick-to: 6.6
Change-Id: I7771bcbe7b3ccc798b885682135d501e2d4d60ee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-27 14:15:40 +02:00
Kamil Hajdukiewicz d7554ab700 Refresh the 'Multimedia Player' example
Design of MultimediaPlayer example was refreshed.
New icons, colors, application structure were provided.
Some new functionalities were introduced to the sample:
playlist, shuffle, loop, dark mode.

Tested on Windows, Android Emulator, macOs, iOS emulator.

Change-Id: I38a8e203021edc97b70a4ab8f0d8d83c6d5ae45b
Pick-to: 6.5 6.6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-08 03:08:54 +02:00