youtube-ios-player-helper icon indicating copy to clipboard operation
youtube-ios-player-helper copied to clipboard

Video not loading if using loadVideoById function with startSeconds

Open mkumargupta opened this issue 4 years ago • 2 comments

Hi

Please check bottom line and it's not loading video if using it with startSeconds, It's working fine for simple id function. [self.playerView loadVideoById:videoId startSeconds:50.0];

Thanks

mkumargupta avatar Jul 01 '20 17:07 mkumargupta

I cannot reproduce the issue on my end. Can you add more info?

  • What version of the library are you using? (latest is 1.0.2)
  • Can you reproduce the issue in the sample app that we share in this repo?
  • If not, can you share a basic sample app that shows the issue using the latest version of the library?

Thank you!

brol1dev avatar Jul 08 '20 23:07 brol1dev

I have exactly same issue with Xcode 12 on BigSur and IOS 14: just put a UIView in storyboard, Class to YTPlayerView and make code assignment to ViewController.swift

working code is: `import youtube_ios_player_helper import UIKit

class ViewController: UIViewController {

@IBOutlet var ytView: YTPlayerView!

override func viewDidLoad() super.viewDidLoas() ytView.load(withVideoId: "BXRMxgsarpM") }`

I get a empty view (or black screen as I set backgroundcolor of view to black) when using ytView.loadVideo(byId: "BXRMxgsarpM", startSeconds: 20.0) ytView.playVideo()

I did the pod install three days ago. Working great if want to have YT video view from the beginning. But I want to have it from a certain second. I also tried to set the startSeconds in playerVars but same behaviour.

marc-cram avatar Mar 05 '21 13:03 marc-cram