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

How to change the fullscreen element? #4859

Closed
debjits1 opened this issue Dec 30, 2022 · 8 comments · Fixed by #4963
Closed

How to change the fullscreen element? #4859

debjits1 opened this issue Dec 30, 2022 · 8 comments · Fixed by #4963
Labels
component: UI The issue involves the Shaka Player UI flag: good first issue This might be a relatively easy issue; good for new contributors flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@debjits1
Copy link

Have you read the Tutorials?
Yes

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
4.3.0

Please ask your question
I am trying to add a sidebar beside my video, and I am using custom ui element.
The problem which I am facing is, the ui controls are overlapping the sidebar on fullscreen.
As per my understanding, this is because the container for both ui controls and sidebar is same.
I am looking for a way to change the fullscreen element so that I can keep the sidebar in a different container. Can anyone help me here?

image

@debjits1 debjits1 added the type: question A question from the community label Dec 30, 2022
@WINOFFRG
Copy link
Contributor

WINOFFRG commented Jan 2, 2023

Are you using Shaka Player Default UI or some custom? It looks like some CSS Issue. In Chrome, Firefox, etc - If you are on full screen, top-layer will be applied.

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jan 3, 2023
@debjits1
Copy link
Author

debjits1 commented Jan 3, 2023

Are you using Shaka Player Default UI or some custom? It looks like some CSS Issue. In Chrome, Firefox, etc - If you are on full screen, top-layer will be applied.

I am using custom UI.

@WINOFFRG
Copy link
Contributor

WINOFFRG commented Jan 3, 2023

I guess it is then related to CSS stuff and not Shaka specific. However, feel free to share screenshots, or code snippets or codesandbox link.

@github-actions github-actions bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jan 3, 2023
@joeyparrish
Copy link
Member

I'm assuming that you built your own UI in HTML + CSS + JS, and that you're not using shaka-player.ui.js. Is that correct?

From your diagram, it looks like you currently have something structured like:

<div id="container">
  <div>
    <div id="video"></div>
    <div id="sidebar"></div>
  </div>
  <div id="controls"></div>
</div>

But what you want is to have a structure like:

<div id="container">
  <div>
    <div id="video"></div>
    <div id="controls"></div>
  </div>
  <div id="sidebar"></div>
</div>

Does this help?

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jan 3, 2023
@github-actions
Copy link
Contributor

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.

@github-actions github-actions bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jan 10, 2023
@debjits1
Copy link
Author

debjits1 commented Jan 11, 2023

@shaka-bot reopen

I'm assuming that you built your own UI in HTML + CSS + JS, and that you're not using shaka-player.ui.js. Is that correct?

From your diagram, it looks like you currently have something structured like:

<div id="container">
  <div>
    <div id="video"></div>
    <div id="sidebar"></div>
  </div>
  <div id="controls"></div>
</div>

But what you want is to have a structure like:

<div id="container">
  <div>
    <div id="video"></div>
    <div id="controls"></div>
  </div>
  <div id="sidebar"></div>
</div>

Does this help?

@joeyparrish

I don't have a separate element created for controls. Below is the code snippet which I am using.
I am marking the elements which I want to make the fullscreenElement in code snippet below.

const ui = new shaka.ui.Overlay(player, videoContainer, video);
...
<div className={classes.root}>
      <div className={classes.videoAspectRatioWrapper}> // The element I want to be the fullscreen element
        <div ref={videoContainerRef}>  // This is the current fullscreen element
          <video id='video' ref={videoRef} className={classes.video} muted autoPlay playsInline />
        </div>
      </div>
      <SideBar />
</div>

The problem with this code is when I try to move Sidebar inside <div ref={videoContainerRef}>, it starts overlapping the controls.

Would you be able to help me here?

@github-actions github-actions bot reopened this Jan 11, 2023
@joeyparrish
Copy link
Member

The Shaka Player UI doesn't let you choose the fullscreen element. That is hard-coded to the container. So if you want Sidebar to show in fullscreen mode, you'll want to move it inside the container.

I would suggest adjusting the styles to make it sit where you want, and to make the controls take up the same space as the video element instead of the whole container.

Alternately, you could modify Shaka Player to use a different class to declare the fullscreen element, or to add a method on Overlay to change the fullscreen element (which would default to the video container). This may be easier than restyling everything.

Does this help?

@debjits1
Copy link
Author

Thanks for the suggestion @joeyparrish . I would update the method to select fullscreen element.
But, since I am very new to shaka player, it would take some time for me to update the method.
So, I would keep this issue open and request everyone who come across this issue to help me out with a PR.

@joeyparrish joeyparrish added type: enhancement New feature or request flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this flag: good first issue This might be a relatively easy issue; good for new contributors component: UI The issue involves the Shaka Player UI priority: P3 Useful but not urgent and removed type: question A question from the community labels Jan 13, 2023
@github-actions github-actions bot added this to the Backlog milestone Jan 13, 2023
@avelad avelad modified the milestones: Backlog, v4.4 Feb 3, 2023
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Apr 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: UI The issue involves the Shaka Player UI flag: good first issue This might be a relatively easy issue; good for new contributors flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants