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

The loopEnabled configuration doesn't loop a video. #68

Closed
EvgenyKarkan opened this issue May 20, 2023 · 4 comments
Closed

The loopEnabled configuration doesn't loop a video. #68

EvgenyKarkan opened this issue May 20, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@EvgenyKarkan
Copy link

EvgenyKarkan commented May 20, 2023

What happened?

I might be missing something, but it appears evident that enabling the loopEnabled feature should make a video repeat continuously. However, for some reason, the video doesn't repeat and just ends.

What are the steps to reproduce?

func setupYouTubeView() {
    let configuration = YouTubePlayer.Configuration(
        automaticallyAdjustsContentInsets: true,
        fullscreenMode: .system,
        showControls: true,
        loopEnabled: true,
        useModestBranding: true
    )

    youTubePlayer = YouTubePlayer(
        source: .url("https://youtube.com/watch?v=YE7VzlLtp-4"),
        configuration: configuration
    )

    youTubeView = YouTubePlayerHostingView(player: youTubePlayer!)
    youTubeView?.autoresizingMask = [.flexibleHeight, .flexibleWidth]

    containerView.addSubview(youTubeView!)
}

What is the expected behavior?

I had the expectation that the video would repeat in a continuous loop.

@EvgenyKarkan EvgenyKarkan added the bug Something isn't working label May 20, 2023
@SvenTiigi
Copy link
Owner

Hi @EvgenyKarkan,

Please check out the develop branch which contains a fix for the loop parameter.

@EvgenyKarkan
Copy link
Author

Thank you very much, I trust you the issue is fixed.
Please feel free to close the current ticket as you see fit.
I am not blocked at all and can wait until the new release is available, so I can pull the updated SPM package.

@SvenTiigi
Copy link
Owner

Thanks!
I will let you know when a new release is available ✌️

@SvenTiigi
Copy link
Owner

The fix is now available with the latest version 1.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants