Skip to content

Shifting of Screen when Clicking on Seek Bar #4

Description

@DikshaJoshi5639

When We want to seek the video during small screen view, the entire screen moves away with the video. Also while moving the screen the videos keeps seeking.
Here is a code which might help to resolve the issue at
https://www.student-platform.devtown.in/video

<title>Video with Seek Bar</title> <style> body { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; background-color: #f0f0f0; }
    video {
        max-width: 100%;
    }
</style>

Video Player with Seek Bar

<script>
    const videoPlayer = document.getElementById('videoPlayer');
    const seekBar = document.getElementById('seekBar');

    seekBar.addEventListener('input', () => {
        const seekTime = (videoPlayer.duration / 100) * seekBar.value;
        videoPlayer.currentTime = seekTime;
    });
</script>

**Here is the Video

Uploading Issue with Video Screen Shifting.mp4…

with the following issue**
https://github.com/Devtown-India/Python-for-Data-Science-/assets/148073630/41f3ba88-c4eb-4297-8545-562d3a582034

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions