Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

[ASVideoPlayerNode] Added an optional full screen button#2688

Merged
Adlai-Holler merged 11 commits intofacebookarchive:masterfrom
MarvinNazari:master
Dec 21, 2016
Merged

[ASVideoPlayerNode] Added an optional full screen button#2688
Adlai-Holler merged 11 commits intofacebookarchive:masterfrom
MarvinNazari:master

Conversation

@MarvinNazari
Copy link
Copy Markdown
Contributor

@MarvinNazari MarvinNazari commented Dec 1, 2016

To enable the new control type ASVideoPlayerNodeControlTypeFullScreenButton you need replace the default default controls.

func videoPlayerNodeNeededDefaultControls(videoPlayer: ASVideoPlayerNode) -> [AnyObject] {
        return [
            NSNumber(unsignedInt: ASVideoPlayerNodeControlTypeElapsedText.rawValue),
            NSNumber(unsignedInt: ASVideoPlayerNodeControlTypeScrubber.rawValue),
            NSNumber(unsignedInt: ASVideoPlayerNodeControlTypeDurationText.rawValue),
            NSNumber(unsignedInt: ASVideoPlayerNodeControlTypeFullScreenButton.rawValue)
        ]
}

and even return an image for the button

func videoPlayerNodeFullScreenButtonImage(videoPlayer: ASVideoPlayerNode) -> UIImage {
    return UIImage(named: "video-player-fullscreen")!
}

Copy link
Copy Markdown
Contributor

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarvinNazari Thanks for adding this! Video player node is becoming very fleshed-out, and just in time since top-notch video support is highly sought-after by users this year.

@Adlai-Holler Adlai-Holler merged commit 3506cec into facebookarchive:master Dec 21, 2016
@MarvinNazari
Copy link
Copy Markdown
Contributor Author

MarvinNazari commented Dec 21, 2016

@Adlai-Holler Happy to contribute, even with my limited Objective-C skills 😃

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants