question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ChromeCast remote control

See original GitHub issue

I’m having a tough time getting the Shaka player UI to control both local player and remote ChromeCast player. I’m using castProxy.getPlayer() and castProxy.getVideo() for pretty much everything but UI controls are working only for local player. I can call methods manually, ie proxyVideo.pause(), etc, and it works. But i figure that it should probably work out of the box, i just can’t figure out how to get it working. Basically i instantiate CastProxy, get player and video and use them for setting up shaka and UI controls. Only place where i couldn’t use proxyVideo is when instantiating shaka.ui.Overlay since it throws and error Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. So, i’m not sure whether this is the reason controls are not working for both players out of the box, or it’s just not possible and should be done manually, or i’m missing something. Any help would be appreciated.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joeyparrishcommented, May 16, 2019

Ah, I see. With the UI library, it will create the proxy for you. Try this instead:

const ui = new shaka.ui.Overlay(localPlayer, videoContainer, localVideo);
uiConfig.castReceiverAppId = 'FILL_IN_YOUR_APP_ID_HERE';
ui.configure(uiConfig);

const proxyPlayer = ui.getControls().getPlayer();

There seems to be a bug here, in that ui.getPlayer() always returns a local player. I’ll get that fixed. In the mean time, ui.getControls().getPlayer() returns the proxied player as it should.

0reactions
bojant987commented, May 17, 2019

Yeah, it does. Thanks for the quick response and fix. I’ll try it out later today, closing the issue now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Voice Remote for Chromecast with Google TV
Control manually or just use your voice. Use the remote to control the volume, switch inputs, play music, and get answers on-screen.
Read more >
Use your phone as a virtual remote control - Chromecast Help
From the top of your screen, swipe down twice. At the bottom left, tap Edit . Touch and hold TV Remote and drag...
Read more >
Replacement Remote for Google Chromecast 4k Snow ...
Buy Replacement Remote for Google Chromecast 4k Snow Streaming Media Player (Remote Control ONLY) - GA01919REM GA01919-US: Remote Controls - Amazon.com ...
Read more >
Chromecast Remote - Walmart
New URMT42JHG008 Remote Control For PHILIPS CHROMECAST TV 65PFL5922F7 YKF399-104 ... Replacement Voice Remote Control For Chromecast GA01923-US Bluetooth IR ...
Read more >
How to use your TV remote with a Google Chromecast
To start using your TV remote, all you need to do is find the option to turn on HDMI-CEC in your TV's settings....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found