Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Developer
Posts: 180
Registered: ‎12-09-2011
My Device: 9360, BB10
My Carrier: Aircel

Require authentication to play the http:// url of video in media player.

HI All,

 

I want to play the http://... video url in my app but this url need authentication means we need to set some header for this so my problem is that how to set the authentication parameter in the media player to open this url in media player.

I am using the following code:-

 

MediaPlayer {
id: player
// Set these properties for video
videoOutput: VideoOutput.PrimaryDisplay
windowId: fwcVideoSurface.windowId
sourceUrl: "http://....."

property bool isPlaying: false
onBufferStatusChanged: {
if (myPlayer.bufferStatus == BufferStatus.Buffering) {
// Show the ProgressBar when loading started.
bufferIndicator.visible = true
bufferingLabel.visible = true
} else if (myPlayer.bufferStatus == BufferStatus.Playing) {
// Hide the ProgressBar when loading is complete.
bufferIndicator.visible = false
bufferingLabel.visible = false
} else if (myPlayer.bufferStatus == BufferStatus.Idle) {
bufferIndicator.visible = false
bufferingLabel.visible = false
}
}
}

 

Please provide any suggestion for this.

Developer
Posts: 180
Registered: ‎12-09-2011
My Device: 9360, BB10
My Carrier: Aircel

Re: Require authentication to play the http:// url of video in media player.

Hi All,

 

Anyone have idea about the above post. Please provide any suggestion.

 

Thanks in Advance.