Media Player

The Media Player app in the reference image is the same multimedia player sample provided in the Qt 5.3.1 distribution (Media Player Example).

This sample uses the standard Qt APIs to browse and play media content stored on local devices. Audio and video playback is supported.

To start the application, tap MediaPlayer on the Home screen. When the app runs, the screen lists the available media content on the left side and displays the output window for playback and the playback controls on the right side.

The app provides separate tabs (Music and Video) that let you browse audio and video content. The Music tab is selected when the app starts. Under this tab, the available audio files are listed (the reference image comes with several songs). If you tap the Video tab, the available videos are listed (this release provides only one video).

To browse content, swipe up or down to scroll through the list of files. To play a file, tap its list entry (this entry gets highlighted). When playing audio, the application displays the track and artist names in the output window. With videos, the video stream is rendered in this window.

The playback controls are the same for music and videos. The middle button is initially the Play button. When you tap it to start playback, this button changes to a Pause button. You can then toggle between the pause and play functions.

On both sides of the middle button are the controls for fast-forward and fast-backward. You can tap either button multiple times to increase the playback speed to 2, 4, 8, and 16 times normal speed (for the forwards and backwards directions).

At the left and right ends of the playback buttons are the controls for skipping to the next and previous media files. The Next button always skips to the next file, but the Previous button can skip to the previous file (if you tap this button before 3 seconds into playback) or restart playback at the beginning of the current file (if you tap this button at 3 seconds or later into playback).

Updating the media libraries:

The audio and video files accessible to the Media Player app are stored in /accounts/1000/shared/music and /accounts/1000/shared/videos. You can add to the music and video libraries by copying media content from a device to those directories on the target system. You can also delete files from those directories to remove media content. The media file formats supported by this application are given in the Release Notes for the QNX SDK for Apps and Media.

The process for updating the media libraries is as follows:

  1. Close the Media Player app (if it's open).
  2. Add or delete media files in the music or videos directories as desired.
  3. Open the Media Player app to see and play the updated content.
Note: The application does not support dynamic media content. New media files won't be listed or played properly if you add them when Media Player is open.

Considerations:

Connect the target board to speakers so that you can hear the audio.

Note: VMware doesn't support video playback.

Location on the reference image:

/apps/com.example.mediaplayer.testRel_mediaplayer178ac554