Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed adjustment not working #6

Open
darkamgine opened this issue Dec 15, 2021 · 16 comments
Open

Speed adjustment not working #6

darkamgine opened this issue Dec 15, 2021 · 16 comments

Comments

@darkamgine
Copy link

darkamgine commented Dec 15, 2021

When using this package, changing the speed modifer doesn't seem to take effect. The video still plays at 1.0x speed no matter if 0.25x or 2.0x is selected. This happens with the friedchickenbutt version as well, but works as expected with the original unmodded version.

Temporarily disabling adblock and sponsorblock had no effect on these results.

Tv: lg oled b9
Webos: 05.00.15

@Informatic
Copy link
Member

If I remember correctly this is a limitation of webOS WAM browser on webOS 3.x and 4.x. Not sure about webOS 5.x (above version is firmware version, not webOS TV version, I suspect B9 is around webOS 5.x)

@darkamgine
Copy link
Author

Ah the b9 is tv version 4.9.0 goldilocks gyeryongsan so that makes sense. Does this mean there's no way around this issue on this model?

@Crazor
Copy link

Crazor commented Dec 22, 2021

Well, on my B9SLA, the official YouTube app does support changing the speed, albeit with audio artifacts that I don't get on my computers or my phone.
This fork does have the speed controls, but they do not do anything.

@aabytt
Copy link

aabytt commented Dec 27, 2021

at the same time playback speed works fine when running the package in lg webos emulator

@Informatic
Copy link
Member

Just tested on webOS 3.8 with default trustLevel application (youtube is running on netcast due to need of user-agent spoofing) and video playbackRate adjustment causes audio to go mute.

The fact it works in an emulator is likely caused by discrepancies between video flow - emulator definitely uses software decoding, likely one already built into Chrome.

@Manu99it
Copy link

Manu99it commented Jan 3, 2022

Just for confirming, even for me doesn't work on webOS 6.2.0-32 latest build for c1 (03.21.05), official app instead yes. Is this fixable? I use very often this feature😬

@Informatic
Copy link
Member

Does speed adjustment in official app have working audio?

In general - this is going to be fairly hard - we'll probably need to release multiple app versions... But we'll see.

@Manu99it
Copy link

Manu99it commented Jan 3, 2022

Does speed adjustment in official app have working audio?

In general - this is going to be fairly hard - we'll probably need to release multiple app versions... But we'll see.

Yep, in official app audio works perfectly from 0.25 to 2x speed without notable issues

@vincentchew91
Copy link

Had the same issue with LG CX with version 0.3.1

@KTsarlz
Copy link

KTsarlz commented Jun 7, 2022

Wondering if anyone was able to finx a fix? On 0.3.1 the playback speed is not there on my C1, but on the official youtube app it's there

@Informatic
Copy link
Member

This is pretty much unfixable in current state.

HTML5 <video> speed adjustment doesn't work in the mode we need to use to apply our extra features/custom user-agent (netcast backward compatiblity), and even if it did, audio is muted when using non-1.0 speed in WebAppMgr (webOS webapp container manager).

This works in official app only because they have their own custom browser (Cobalt) with semi-custom media handling routines - but we are effectively unable to reuse that without going down a licensing rabbit hole/an enormous amount of extra development.

@DeMoN3rock
Copy link

Hi all,
ok, it's not possible to adjust speed, but...is it possibile to install BOTH official and non-official youtube app on the same tv?
In this way I can use the unofficial when I want to skip ads, but the official when I need to view something in 2x

PS: reVanced and similar youtube app let 2x playback and ads skipping at the same time; I dunno if the code base is similar, could be usefull to see at them for implementing this funcionality?

@throwaway96
Copy link
Member

As far as I know, you can have this installed (and functional) at the same time as the official app if you change the app ID (id in assets/appinfo.json).

@DrA1ex
Copy link

DrA1ex commented Aug 11, 2024

Hi everyone!

I’ve discovered a method to adjust playback speed in WebOS, and I’ve confirmed that it works on my TV (WebOS 4.1, tested in Lampa app).

Here’s a description of the method: link.
Here's instruction how to get media_id: link

Example code:

webOS.service.request("luna://com.webos.media", {
    method: "setPlayRate",
    parameters: { 
        'mediaId': "_tul03L7E2FoL5d",
        'playRate': 1.5,
        'audioOutput': true
    }
});

While it may be tricky to implement this method in the current app, but I hope it helps!

UPD.

Just tested method via ssh:

# Find object with the same 'appId' and get the 'id' parameter
luna-send -n 1 "luna://com.webos.media/getActivePipelines" '{}'

# Use the previously found id instead of <MEDIA_ID>
luna-send -n 1 -f 'luna://com.webos.media/setPlayRate' '{"mediaId": "<MEDIA_ID>", "playRate": 1.5, "audioOutput": true}'

Command work with Lampa app, but unfortunately it doesn't work with YouTube app.

UPD 2

It seems like this method only works for managed pipelines. There used to be a deprecated method registerMedia to make a pipeline managed, but it's no longer available. I also tried the attach method, but it doesn't work either.

After checking the Lampa app source code, I noticed they use the setPlayRate method, but they also use the load method to play the video. This makes the pipeline managed, returns the media_id, and allows the luna commands to execute successfully.

I also noticed that speed control works in the built-in browser app. Although I can't connect to it with the inspector, I assume it uses some standard mechanism to make speed control work, as it allow to change speed of video on site that is not specifically optimized for WebOS.

@aabytt
Copy link

aabytt commented Aug 16, 2024

@DrA1ex
setPlayRate and other com.webos.media methods not available in YTAF because it uses netcast trustlevel to spoof user-agent

@DrA1ex
Copy link

DrA1ex commented Aug 16, 2024

setPlayRate and other com.webos.media methods not available in YTAF because it uses netcast trustlevel to spoof user-agent

Just tried to build package with default trustLevel and without custom user-agent, but seems like it still doesn't work.
I also tried changing playbackRate via ares-inspect and that doesn't work either (but does work in simulator).

It looks like there is a way to implement playback speed (since it works in the browser or in the Lampa app), but it would require the LS2 API and custom video playback logic. No easy way, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants