{"id":1561,"url":"https://github.com/vimeo/VIMVideoPlayer","last_synced_at":"2025-08-02T04:31:51.439Z","repository":{"id":30189753,"uuid":"33740508","full_name":"vimeo/VIMVideoPlayer","owner":"vimeo","description":"Deprecated: Please use [PlayerKit]( https://github.com/vimeo/PlayerKit) instead.","archived":true,"fork":false,"pushed_at":"2017-09-09T15:52:23.000Z","size":25542,"stargazers_count":281,"open_issues_count":17,"forks_count":62,"subscribers_count":42,"default_branch":"v6.0.2","last_synced_at":"2024-11-16T07:47:53.099Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vimeo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-10T17:09:28.000Z","updated_at":"2024-03-12T12:39:17.000Z","dependencies_parsed_at":"2022-08-28T18:44:04.243Z","dependency_job_id":null,"html_url":"https://github.com/vimeo/VIMVideoPlayer","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimeo%2FVIMVideoPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimeo%2FVIMVideoPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimeo%2FVIMVideoPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimeo%2FVIMVideoPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vimeo","download_url":"https://codeload.github.com/vimeo/VIMVideoPlayer/tar.gz/refs/heads/v6.0.2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228438976,"owners_count":17920017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:49.872Z","updated_at":"2024-12-06T08:31:14.078Z","avatar_url":"https://github.com/vimeo.png","language":"Objective-C","funding_links":[],"categories":["Media"],"sub_categories":["Video","Other free courses"],"readme":"⚠️⚠️⚠️\nThis library has been deprecated and will be removed in the future. Use [PlayerKit](https://github.com/vimeo/PlayerKit)  instead.\n⚠️⚠️⚠️\n\n# VIMVideoPlayer\n\n`VIMVideoPlayer` is a simple wrapper around the [AVPlayer](https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVPlayer_Class/index.html) and [AVPlayerLayer](https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVPlayerLayer_Class/index.html#//apple_ref/occ/cl/AVPlayerLayer) classes. \n\n## Setup\n\nAdd the `VIMVideoPlayerView` and `VIMVideoPlayer` classes to your project. \n\nDo this by including this repo as a git submodule or by using cocoapods:\n\n```Ruby\n# Add this to your podfile\ntarget 'MyTarget' do\n   pod 'VIMVideoPlayer', ‘{CURRENT_POD_VERSION}’\nend\n```\n\n## Usage\n\nCreate a new `VIMVideoPlayerView` instance or set up an @IBOutlet:\n\n```Swift\n\n@IBOutlet weak var videoPlayerView: VIMVideoPlayerView!\n\n...\n\noverride func viewDidLoad()\n{\n    // Configure the player as needed\n    self.videoPlayerView.player.looping = true\n    self.videoPlayerView.player.disableAirplay()\n    self.videoPlayerView.setVideoFillMode(AVLayerVideoGravityResizeAspectFill)\n    \n    self.videoPlayerView.delegate = self\n}\n\n```\n\nPlay a video:\n\n```Swift\n\n// Using an NSURL\n\nif let path = NSBundle.mainBundle().pathForResource(\"waterfall\", ofType: \"mp4\")\n{\n    self.videoPlayerView.player.setURL(NSURL(fileURLWithPath: path))\n}\nelse\n{\n    // Video file not found!\n}\n\n/* \n  Note: This must be a URL to an actual video resource (e.g. http://website.com/video.mp4 or .m3u8 etc.),\n  It cannot be a URL to a web page (e.g. https://vimeo.com/67069182),\n  See below for info on using VIMVideoPlayer to play Vimeo videos.\n*/\n\n// Using an AVPlayerItem\n\nlet playerItem: AVPlayerItem = ...\nself.videoPlayerView.player.setPlayerItem(playerItem)\nself.videoPlayerView.player.play()\n\n// Or using an AVAsset\n\nlet asset: AVAsset = ...\nself.videoPlayerView.player.setAsset(asset)\nself.videoPlayerView.player.play()\n\n```\n\nOptionally implement the `VIMVideoPlayerViewDelegate` protocol methods:\n\n```Swift\n\nprotocol VIMVideoPlayerViewDelegate \n{    \n    optional func videoPlayerViewIsReadyToPlayVideo(videoPlayerView: VIMVideoPlayerView!)\n    optional func videoPlayerViewDidReachEnd(videoPlayerView: VIMVideoPlayerView!)\n    optional func videoPlayerView(videoPlayerView: VIMVideoPlayerView!, timeDidChange cmTime: CMTime)\n    optional func videoPlayerView(videoPlayerView: VIMVideoPlayerView!, loadedTimeRangeDidChange duration: Float)\n    optional func videoPlayerViewPlaybackBufferEmpty(videoPlayerView: VIMVideoPlayerView!)\n    optional func videoPlayerViewPlaybackLikelyToKeepUp(videoPlayerView: VIMVideoPlayerView!)\n    optional func videoPlayerView(videoPlayerView: VIMVideoPlayerView!, didFailWithError error: NSError!)\n}\n\n```\n\nSee [`VIMVideoPlayer.h`](https://github.com/vimeo/VIMVideoPlayer/blob/master/VIMVideoPlayer/VIMVideoPlayer.h) for additional configuration options. \n\n## Playing Vimeo Videos\n\n[Vimeo Pro](https://vimeo.com/pro) members can access playback URLs for Vimeo videos using the [Vimeo API](https://developer.vimeo.com/). Playback URLs are only included in the response object if the requesting account is a [Vimeo Pro](https://vimeo.com/pro) account.\n\nIf you have a [Vimeo Pro](https://vimeo.com/pro) account, when you make a request to the [Vimeo API](https://developer.vimeo.com/) for a video object the response object will contain a list of video `files`. These represent the various resolution video files available for this particular video. Each has a `link`. You can use the string value keyed to `link` to create an NSURL. You can pass this NSURL to VIMVideoPlayer for playback.\n\nCheck out [this](http://stackoverflow.com/questions/31960338/ios-vimvideoplayerview-cant-load-vimeo-videos) Stack Overflow question for additional info.\n\nYou can use the [Vimeo iOS SDK](https://github.com/vimeo/VIMNetworking) to interact with the [Vimeo API](https://developer.vimeo.com/). \n\nFor full documentation on the Vimeo API go [here](https://developer.vimeo.com/).\n\n## Found an Issue?\n\nPlease file it in the git [issue tracker](https://github.com/vimeo/VIMVideoPlayer/issues).\n\n## Want to Contribute?\n\nIf you'd like to contribute, please follow our guidelines found in [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\n`VIMVideoPlayer` is available under the MIT license. See the [LICENSE](LICENSE.md) file for more info.\n\n## Questions?\n\nTweet at us here: [@vimeoapi](https://twitter.com/vimeoapi).\n\nPost on [Stackoverflow](http://stackoverflow.com/questions/tagged/vimeo-ios) with the tag `vimeo-ios`.\n\nGet in touch [here](https://vimeo.com/help/contact).\n\nInterested in working at Vimeo? We're [hiring](https://vimeo.com/jobs)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimeo%2FVIMVideoPlayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimeo%2FVIMVideoPlayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimeo%2FVIMVideoPlayer/lists"}