Gadget : play untill done : while switching presentation in a schedule. - Schedule displays next presentation after 10 seconds

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Problem :
Gadget : play untill done : while switching presentation in a schedule. - Schedule displays next presentation after 10 seconds, and not waiting for the DONE event from my custom widget.

Details:

I created one gadget for playing video in Android devices.
If my schedule has only one presentation, it works fine.
If my schedule has 2 presentations,(presentation-1 with video, and presentation-2 with other items),
second presentations starts displaying before the video gadget in the first presentation sends 'DONE event'.

Please help me to find any missing functions/paramters in the widget creation.

I followed the blog http://www.risevision.com/help/develo... to create a widget.
And compared my code with Vimeo.xml (vimeo video widget)

I iused the following code.





in javascript

var id = prefs.getString("id");

function play() {

}

function pause() {

}

function stop() {

}

if (id != null && id != "") {
gadgets.rpc.register("rscmd_play_" + id, play);
gadgets.rpc.register("rscmd_pause_" + id, pause);
gadgets.rpc.register("rscmd_stop_" + id, stop);
}

function errorEvent() {
gadgets.rpc.call("", "rsevent_error", null, id, true, true, true, true);
}

// sends "DONE" event to the Viewer
function doneEvent() {
gadgets.rpc.call("", "rsevent_done", null, id, true, true, true, true);
}

// Called by the player, when it completes the playing.
var onCompleteFunction = function (){
doneEvent();
};

// sends "READY" event to the Viewer
var readyEvent = function (){
gadgets.rpc.call("", "rsevent_ready", null, id, true, true, true, true);
};

function onPlayerWidgetLoad(){
readyEvent();
}

gadgets.util.registerOnLoadHandler(onPlayerWidgetLoad);
Photo of Prince Francis

Prince Francis

  • 182 Points 100 badge 2x thumb

Posted 5 years ago

  • 1
Photo of Neal

Neal

  • 61,252 Points 50k badge 2x thumb
I do apologize, but at this time, Presentations added to a Schedule aren't set to be Play Until Done (PUD). They are run by the Duration set for each Presentations (which is by default 10 seconds).

A different way of handling this could be done by embedding Presentations within another, as the Presentation Item supports PUD.

Thanks.
Photo of Ian Watson

Ian Watson

  • 80 Points 75 badge 2x thumb
Will or can the schedule be changed to allow Play Until Done option for presentations?
Photo of Neal

Neal

  • 61,252 Points 50k badge 2x thumb
Ian,

The closest option at this time would be to embed a Presentation into another.  Embedded Presentations can be set to Play Until Done.  You can have a 'master' Presentation and then add the Presentations you want to show within it.  You'll then add this 'master' Presentation to the Schedule.

Thanks.
Photo of Biologyben

Biologyben

  • 3,558 Points 3k badge 2x thumb
Just had the same issue come up - Is this feature in the roadmap?  
Photo of Byron

Byron, Keener

  • 9,658 Points 5k badge 2x thumb
It is but there isn't a timeline for it as of yet... Thanks