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
Contributor
wzl0515
Posts: 27
Registered: ‎08-14-2012
My Device: bold9780
My Carrier: T-MOBILE

Re: Cannot play a video using QML code

Thank you very much, I have figure it out.

Please use plain text.
New Contributor
diorahman
Posts: 3
Registered: ‎11-30-2012
My Device: BlackBerry 10 dev alpha
My Carrier: Telkomsel

Re: Cannot play a video using QML code

Is it possible to put overlay qml element on top of invoked card?

 

Thanks

 

Dio

Please use plain text.
BlackBerry Development Advisor (Retired)
s_rashid
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Cannot play a video using QML code

@diorahman

 

Unfortunately, no. At this point, you cannot edit or put QML elements on top of an invoked card. When you invoke a card, you are essentially just putting another application on top of yours (it animates/slides in like a *Sheet* or *NavigationPane* Page) and your app loses control. So you are limited to the implementation of whatever app you invoked to be on top of yours. Feel free to browse some of the BB Jam presentation materials (public info: videos, PDF slides etc) on the invocation & share framework, to learn more about what you can and cannot do. 
http://www.blackberryjamconference.com/


That being said, it is not too difficult to implement your own media previewer/player, simply using QML.

 

Cheers,
Rashid

 

 

Please use plain text.
Developer
bbquincar
Posts: 304
Registered: ‎08-14-2012
My Device: PlayBook, Z10, Dev C
My Carrier: Rogers

Re: Cannot play a video using QML code

[ Edited ]

is there a working sample for this yet would love to see how it works on the sim thanks

BlackBerry 10 game reviews for the unknown, small and indie developers. Little games with big dreams. VeryBerryGames.com | Follow @VeryBerryGames | TwoCasualCoders.com | never casual on quality
Please use plain text.
Contributor
somnathbanik
Posts: 19
Registered: ‎05-21-2012
My Device: Bold
My Carrier: Vodafone

HiRe: Cannot play a video using QML code

Hi Guys,

Could you please tell me where can I writetechnical  articles on BB community site.

Please use plain text.
Contributor
wzl0515
Posts: 27
Registered: ‎08-14-2012
My Device: bold9780
My Carrier: T-MOBILE

Re: Cannot play a video using QML code

Hello, cause the sdk up to the gold version, I found the Invocation about Media Player have some thing change. So my code is going wrong when call the card to play vedio.

my code is like this:

void Myapp::invokeBoundMediaPlayer(QString uri) {
	InvokeRequest cardRequest;
	cardRequest.setTarget("sys.mediaplayer.previewer");
	cardRequest.setUri(uri);
	InvokeManager invokeManager;
	invokeManager.invoke(cardRequest);
}

 and in qml file:

    attachedObjects: [
            FilePicker {
                id: picker
                property string selectedFile
                title: qsTr("File Picker")
                mode: pickerMode.selectedValue
                type: pickerType.selectedValue
                viewMode: pickerViewMode.selectedValue
                sortBy: pickerSortBy.selectedValue
                sortOrder: pickerSortOrder.selectedValue
                onFileSelected: {
                    selectedFile = selectedFiles[0]
                    myClass.invokeBoundMediaPlayer(selectedFile);
                }
            }
]

 

so when I run my application, It said "Cannot assign [undefined] to QString".

I need your help, thank you very much.

 

 

 

Please use plain text.
Contributor
girish_bb10
Posts: 12
Registered: ‎12-15-2012
My Device: BB 10 Alpha
My Carrier: Blackberry

Re: Cannot play a video using QML code

Thank you !!!!!! its working.   Do you know how to provide automatic controls for it. like progress bar. play and pause

Please use plain text.
New Contributor
diorahman
Posts: 3
Registered: ‎11-30-2012
My Device: BlackBerry 10 dev alpha
My Carrier: Telkomsel

Re: Cannot play a video using QML code

Awesome! BTW, Why don't we have QtMultimediaKit compatibility?

 

Thx

Please use plain text.
Developer
StevenKader
Posts: 638
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Video plays then card closes??

[ Edited ]

I got this working but I am seeing that the card closes as soon as the video stop playing instead of waiting for the user to hit back .... so the user can't share the video if they want.  Is anyone else seeing this or am I doing something wrong.   Thanks.


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Please use plain text.
BlackBerry Development Advisor (Retired)
s_rashid
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Cannot play a video using QML code

Yes, this is probably by design. Can you please make a quick feature request regarding this on the JIRA site? We can try to push it to the product/dev team from there.

Thanks,
Rashid

Please use plain text.