Giter VIP home page Giter VIP logo

twitchplayer's Introduction

TwitchPlayer

CI Status Version License Platform

THIS IS AN UNOFFICIAL, FAN-MADE WRAPPER. IT IS IN NO WAY ENDORSED BY TWITCH.TV

What is It?

Twitch Player is a library that helps you embed Twitch Streams, Clips, Videos, and Collections into your application easily. You can embed directly from the Storyboard or programmatically.

Example Usage

From the storyboard, drag a WKWebView onto a ViewController. Set it's subclass to TwitchPlayer (for Stream, Video, or Collection playing) or TwitchClipPlayer (for Clip playing)

You can then modify the variables directly from the Storyboard.

NOTE: This library uses WKWebView to display libraries. As a result, you cannot use any Twitch Player from the Storyboard before iOS 11.0.

Note:

As of June 2020, Twitch now requires a Base URL in the string you load. Unfortunately, I am without a Macbook for development right now, and cannot address this library to fix the issue. As a workaround, you can change the "baseURL" string value in the TwitchClipPlayer/other embedded classes to work around this. Since I can't validate the change, it would be awesome if someone could quickly add that functionality so others can use the library!

Example Project

An example project is provided with this project that shows the storyboard-creation of a Clip Player, Stream Player, and Video Player

To run the example project, clone the repo, and run pod install from the Example directory. After that, open the resulting .xcworkspace file and go nuts!

Documentation

Documentation available here

  • If the documentation is not loading, clone this repository and open docs/index.html.

Installation

  1. Install CocoaPods

  2. Add this repo to your Podfile

    target 'Example' do
    	# IMPORTANT: Make sure use_frameworks! is included at the top of the file
    	use_frameworks!
    
    	pod 'TwitchPlayer'
    end
  3. Run pod install in the podfile directory from your terminal

  4. Open up the .xcworkspace that CocoaPods created

  5. Done!

License

TwitchPlayer is available under the MIT license. See the LICENSE file for more info.

twitchplayer's People

Contributors

chris-perkins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

twitchplayer's Issues

Does "playsinline" work well?

Hi Chris!

First, Thanks because I got a hint from your source.
I have a question, Does "playsinline" option work well?

I tried both your source and my source, but I failed to prevent to launch default full-screen player of iOS. Do you have any tip or solution about it?

Thank you :)

Error #3000

How do you get around the failure to play the video due to error #3000? I can't get twitch to play using TwitchPlayer or even in safari..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.