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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Contributor
wzl0515
Posts: 25
Registered: ‎08-14-2012
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 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
s_rashid
Posts: 72
Registered: ‎02-27-2012
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: 299
Registered: ‎08-14-2012
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

Read up on BlackBerry news and QML/C++ tutorials
Check out www.twocasualcoders.com | never casual on quality .....

1 - click to all things Berry & easy share actions. Check out Launch Codes for BlackBerry 10! Find it at Launch Codes for BlackBerry **UPDATED** Get it now.....
Please use plain text.
Contributor
somnathbanik
Posts: 19
Registered: ‎05-21-2012
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: 25
Registered: ‎08-14-2012
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 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 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: 614
Registered: ‎02-03-2010
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     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
BlackBerry Development Advisor
s_rashid
Posts: 72
Registered: ‎02-27-2012
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.