|
JubeatPlus 3.9.11
|
An AVPlayer-backed advert-video view with a touch-revealed menu overlay.
More...
#include <VideoView.h>


Instance Methods | |
| (instancetype) | - initWithFrame: |
| Initialises a transparent, non-opaque, aspect-fit video view. | |
| (void) | - setAutoPlay |
| Marks the view to auto-start playback once the movie is ready. | |
| (void) | - setMovieUrl:posterUrl:movieVoiceFlg: |
| Begins resolving and loading the movie, then builds the on-screen chrome. | |
| (void) | - setPosterImgWithUrl: |
| Loads the poster image from the applilink cache and installs it behind the chrome. | |
| (void) | - backAction |
Tears the player down and reports -closeNotice: to the delegate. | |
| (void) | - soundAction: |
| Toggles the movie's volume and the sound indicator's selected state. | |
| (void) | - storeAction |
Pauses playback and reports -storeNotice: to the delegate. | |
| (void) | - playAction: |
| Toggles play/pause; on first play removes the poster and starts the timer. | |
| (void) | - skipAction: |
Pauses playback and reports -movieEnd to the delegate. | |
| (void) | - repeat |
Seeks to the start, replays, and reports -movieStart to the delegate. | |
| (void) | - pause |
| Pauses playback and deselects the play button. | |
| (void) | - finish |
| Pauses, hides the play button, and pins the menu on (finished state). | |
| (void) | - observeValueForKeyPath:ofObject:change:context: |
| KVO handler for the player item's status and buffering key paths. | |
| (void) | - playerDidPlayToEndTime: |
Notification handler for AVPlayerItemDidPlayToEndTimeNotification . | |
| (void) | - setupTimer |
| Installs the periodic remaining-time observer and refreshes the readout once. | |
| (void) | - syncTimeRemaining |
| Refreshes the remaining-time label and reschedules the pause check. | |
| (void) | - pauseCheck |
| Pauses if the play button is currently selected. | |
| (nullable NSString *) | - timeToString: |
Formats a remaining time in seconds as a mm:ss string. | |
| (void) | - setCacheTimer |
| Creates and starts the GCD timer that polls the cached duration twice a second. | |
| (void) | - pauseTimer |
| Suspends the cache timer if it is running. | |
| (void) | - cancelTimer |
| Cancels and releases the cache timer and any pending timeout check. | |
| (double) | - availableDuration |
| Polls how much of the movie has buffered, revealing the play button and firing cache-end. | |
| (void) | - touchesBegan:withEvent: |
| Toggles the menu overlay on touch. | |
| (void) | - menuOn |
| Fades the menu overlay in. | |
| (void) | - menuOff |
| Fades the menu overlay out (only while playing and not in the error or finished state). | |
| (void) | - streamingTimeoutWatch |
| Arms the streaming-timeout watchdog. | |
| (void) | - streamingTimeoutNowCheck |
| Fires a streaming error if playback still has not begun when the watchdog elapses. | |
| (void) | - streamingError |
| Reports the streaming error, tears the player down, and shows the error overlay. | |
| (void) | - openErrorNotice |
| Store lifecycle notice stub (empty in the binary). | |
| (void) | - appStoreOpenedNotice |
| Store lifecycle notice stub (empty in the binary). | |
| (void) | - appStoreCloseNotice |
| Store lifecycle notice stub (empty in the binary). | |
| (void) | - appStoreClosedNotice |
| Store lifecycle notice stub (empty in the binary). | |
| (void) | - appStoreFailLoadNoticeWithError: |
| Store lifecycle notice stub (empty in the binary). | |
| (void) | - appStoreTransitionNotice |
| Store lifecycle notice stub (empty in the binary). | |
| (void) | - deallocPlayer |
| Cancels the timer, removes observers, and releases the player, layer, and item. | |
| (void) | - clearDelegate |
| Clears the delegate pointer. | |
Properties | |
| id< VideoViewDelegate > | delegate |
| The lifecycle delegate. | |
| AVPlayer * | player |
| The player driving playback. | |
| AVPlayerLayer * | playerLayer |
| The layer that renders the player's video. | |
| AVPlayerItem * | playerItem |
| The current item being played. | |
| UIView * | memuView |
| The menu overlay container. | |
| GradationView * | gradationTopView |
| The top gradient strip that hosts the back, sound, and time controls. | |
| GradationView * | gradationButtomView |
| The bottom gradient strip that hosts the store button. | |
| int | menuStatus |
| The menu overlay state. | |
| UILabel * | currentTimeLabel |
| The label showing the remaining play time. | |
| UIButton * | backButton |
| The back button. | |
| UIButton * | storeButton |
| The store button. | |
| UIButton * | soundButton |
The sound-state indicator (a UIButton with user interaction disabled). | |
| UIButton * | playButton |
| The play/pause button. | |
| UIImageView * | posterImg |
| The poster image shown before playback begins. | |
| id | playTimeObserver |
The token returned by -addPeriodicTimeObserverForInterval:queue:usingBlock: . | |
| dispatch_source_t | timerSource |
| The GCD timer source that polls the cached duration. | |
| BOOL | errorFlg |
| Set once a streaming error has been shown, to suppress a second overlay. | |
| BOOL | playFlg |
| Set once the movie has started playing. | |
| BOOL | autoPlayFlg |
| Set when the movie should auto-start as soon as it is ready. | |
An AVPlayer-backed advert-video view with a touch-revealed menu overlay.
| - (void) appStoreClosedNotice |
Store lifecycle notice stub (empty in the binary).
| - (void) appStoreCloseNotice |
Store lifecycle notice stub (empty in the binary).
| - (void) appStoreFailLoadNoticeWithError: | (nullable NSError *) | error |
Store lifecycle notice stub (empty in the binary).
| error | The load error, ignored. |
| - (void) appStoreOpenedNotice |
Store lifecycle notice stub (empty in the binary).
| - (void) appStoreTransitionNotice |
Store lifecycle notice stub (empty in the binary).
| - (double) availableDuration |
Polls how much of the movie has buffered, revealing the play button and firing cache-end.
| - (void) backAction |
Tears the player down and reports -closeNotice: to the delegate.
| - (void) cancelTimer |
Cancels and releases the cache timer and any pending timeout check.
| - (void) clearDelegate |
Clears the delegate pointer.
| - (void) deallocPlayer |
Cancels the timer, removes observers, and releases the player, layer, and item.
| - (void) finish |
Pauses, hides the play button, and pins the menu on (finished state).
| - (instancetype) initWithFrame: | (CGRect) | frame |
Initialises a transparent, non-opaque, aspect-fit video view.
| frame | The view frame. |
| - (void) menuOff |
Fades the menu overlay out (only while playing and not in the error or finished state).
| - (void) menuOn |
Fades the menu overlay in.
| - (void) observeValueForKeyPath: | (nullable NSString *) | keyPath | |
| ofObject: | (nullable id) | object | |
| change: | (nullable NSDictionary *) | change | |
| context: | (nullable void *) | context |
KVO handler for the player item's status and buffering key paths.
| keyPath | The observed key path. |
| object | The observed object. |
| change | The change dictionary. |
| context | The observer context. |
| - (void) openErrorNotice |
Store lifecycle notice stub (empty in the binary).
| - (void) pause |
Pauses playback and deselects the play button.
| - (void) pauseCheck |
Pauses if the play button is currently selected.
| - (void) pauseTimer |
Suspends the cache timer if it is running.
| - (void) playAction: | (nullable UIButton *) | sender |
Toggles play/pause; on first play removes the poster and starts the timer.
| sender | The play button. |
| - (void) playerDidPlayToEndTime: | (nullable NSNotification *) | notification |
Notification handler for AVPlayerItemDidPlayToEndTimeNotification .
| notification | The play-to-end notification. |
| - (void) repeat |
Seeks to the start, replays, and reports -movieStart to the delegate.
| - (void) setAutoPlay |
Marks the view to auto-start playback once the movie is ready.
| - (void) setCacheTimer |
Creates and starts the GCD timer that polls the cached duration twice a second.
| - (void) setMovieUrl: | (nullable NSString *) | movieUrl | |
| posterUrl: | (nullable NSString *) | posterUrl | |
| movieVoiceFlg: | (nullable NSString *) | movieVoiceFlg |
Begins resolving and loading the movie, then builds the on-screen chrome.
| movieUrl | The movie URL (cached file or stream). |
| posterUrl | The poster/banner image URL. |
| movieVoiceFlg | "1" to play with sound, otherwise muted. |
| - (void) setPosterImgWithUrl: | (nullable NSString *) | url |
Loads the poster image from the applilink cache and installs it behind the chrome.
| url | The poster/banner image URL. |
| - (void) setupTimer |
Installs the periodic remaining-time observer and refreshes the readout once.
| - (void) skipAction: | (nullable id) | sender |
Pauses playback and reports -movieEnd to the delegate.
| sender | The originating control. |
| - (void) soundAction: | (nullable UIButton *) | sender |
Toggles the movie's volume and the sound indicator's selected state.
| sender | The sound button. |
| - (void) storeAction |
Pauses playback and reports -storeNotice: to the delegate.
| - (void) streamingError |
Reports the streaming error, tears the player down, and shows the error overlay.
| - (void) streamingTimeoutNowCheck |
Fires a streaming error if playback still has not begun when the watchdog elapses.
| - (void) streamingTimeoutWatch |
Arms the streaming-timeout watchdog.
| - (void) syncTimeRemaining |
Refreshes the remaining-time label and reschedules the pause check.
| - (NSString *) timeToString: | (float) | time |
Formats a remaining time in seconds as a mm:ss string.
| time | The remaining time in seconds. |
| - (void) touchesBegan: | (nullable NSSet *) | touches | |
| withEvent: | (nullable UIEvent *) | event |
Toggles the menu overlay on touch.
| touches | The touches that began. |
| event | The event they belong to. |
|
readwritenonatomicassign |
The lifecycle delegate.
Held assign (a plain pointer store, not objc_storeWeak), so the owner must clear it via -clearDelegate before the delegate is deallocated.
|
readwritenonatomicstrong |
The bottom gradient strip that hosts the store button.
Note the binary's misspelling "Buttom".
|
readwritenonatomicstrong |
The menu overlay container.
Note the binary's misspelling "memu".
|
readwritenonatomicassign |
The menu overlay state.
0 = hidden, 1 = shown, 2 = animating, 3 = finished (menu pinned on after playback ends). Backed by an int-width ivar.