This tutorial describes how to enable/disable audio or video playback.
The purpose of this tutorial is to show you how to enable/disable audio or video playback separately in a video clip.
Required Background
The Video Client Overview introduces the video client utilities.
Introduction
You can enable/disable the audio and video separately when playing video clips. This means you can:
Note: By default, audio and video are enabled.
This functionality is made available through the CVideoPlayerUtility::SetAudioEnabledL() and CVideoPlayerUtility::SetVideoEnabledL() methods.
The following tasks are covered in this tutorial:
The high level steps to enable/disable audio or video playback are shown here:
Create a new video player utility object.
Open a video clip to play.
Enable/disable audio playback using the CVideoPlayerUtility::SetAudioEnabledL() method:
To enable audio playback set the aAudioEnabled parameter to ETrue.
To disable audio playback set the aAudioEnabled parameter to EFalse.
Enable/disable video playback using the CVideoPlayerUtility::SetVideoEnabledL() method:
To enable video playback set the aVideoEnabled parameter to ETrue.
To disable video playback set the aVideoEnabled parameter to EFalse.
Call the CVideoPlayerUtility::Prepare() method.
Control playback normally.
Example
//Create new video player utility object (iVideoPlayer) // Open the video clip iVideoPlayer->SetAudioEnabledL(EFalse); // disable audio playback iVideoVideoPlayer->SetVideoEnabledL(ETrue); // enable video playback // Audio has been disabled // Playback will be video only // Call Prepare() and then Play() to control playback normally
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.