Bug #2428

page.subscribe is not available in api v1 (duktape)

Added by Leonid Protasov over 6 years ago. Updated over 6 years ago.

Status:FixedStart date:12/24/2014
Priority:NormalDue date:
Assignee:Andreas Smas% Done:

0%

Category:API
Target version:4.8
Found in version:4.7.549 Platform:Linux

Description

Taken from youtube plugin:

            page.subscribe("page.model.metadata.search", function(v) {
                page.metadata.search = v;
            });

History

#1 Updated by Andreas Smas over 6 years ago

  • Description updated (diff)

This needs to be written differently in duktape.

require('showtime/prop').subscribeValue(page.model.metadata.search, function(v) {
 ....
});

#2 Updated by Andreas Smas over 6 years ago

  • Status changed from New to Need feedback

Please test this, it's written from top of my head with no testing :-)

#3 Updated by Leonid Protasov over 6 years ago

I changed the code it won't work. Please take a look at https://github.com/lprot/showtime-plugins/blob/master/youtube2/youtube.js#L372

#4 Updated by Leonid Protasov over 6 years ago

Andreas Öman wrote:

Please test this, it's written from top of my head with no testing :-)

https://github.com/lprot/showtime-plugins/blob/master/youtube2/youtube.js#L372

#5 Updated by Andreas Smas over 6 years ago

Perhaps it should be just page.metadata.search ?

#6 Updated by Leonid Protasov over 6 years ago

Andreas Öman wrote:

Perhaps it should be just page.metadata.search ?

It complains about double json in duktape mode.

#7 Updated by Andreas Smas over 6 years ago

  • Status changed from Need feedback to Fixed

Also available in: Atom PDF