JubeatPlus 3.9.11
Loading...
Searching...
No Matches
VideoView Class Reference

An AVPlayer-backed advert-video view with a touch-revealed menu overlay. More...

#include <VideoView.h>

Inheritance diagram for VideoView:
Collaboration diagram for VideoView:

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.

Detailed Description

An AVPlayer-backed advert-video view with a touch-revealed menu overlay.

Method Documentation

◆ appStoreClosedNotice

- (void) appStoreClosedNotice

Store lifecycle notice stub (empty in the binary).

Ghidra address:
0x22b054

◆ appStoreCloseNotice

- (void) appStoreCloseNotice

Store lifecycle notice stub (empty in the binary).

Ghidra address:
0x22b050

◆ appStoreFailLoadNoticeWithError:

- (void) appStoreFailLoadNoticeWithError: (nullable NSError *) error

Store lifecycle notice stub (empty in the binary).

Parameters
errorThe load error, ignored.
Ghidra address:
0x22b058

◆ appStoreOpenedNotice

- (void) appStoreOpenedNotice

Store lifecycle notice stub (empty in the binary).

Ghidra address:
0x22b04c

◆ appStoreTransitionNotice

- (void) appStoreTransitionNotice

Store lifecycle notice stub (empty in the binary).

Ghidra address:
0x22b05c

◆ availableDuration

- (double) availableDuration

Polls how much of the movie has buffered, revealing the play button and firing cache-end.

Returns
The buffered duration in seconds.
Ghidra address:
0x22a070
Ghidra address:
0x22a070
Ghidra address:
0x22a340

◆ backAction

- (void) backAction

Tears the player down and reports -closeNotice: to the delegate.

Ghidra address:
0x2290b8

◆ cancelTimer

- (void) cancelTimer

Cancels and releases the cache timer and any pending timeout check.

Ghidra address:
0x229ff8

◆ clearDelegate

- (void) clearDelegate

Clears the delegate pointer.

Ghidra address:
0x22b1f4

◆ deallocPlayer

- (void) deallocPlayer

Cancels the timer, removes observers, and releases the player, layer, and item.

Ghidra address:
0x22b060

◆ finish

- (void) finish

Pauses, hides the play button, and pins the menu on (finished state).

Ghidra address:
0x229614

◆ initWithFrame:

- (instancetype) initWithFrame: (CGRect) frame

Initialises a transparent, non-opaque, aspect-fit video view.

Parameters
frameThe view frame.
Returns
The initialised view.
Ghidra address:
0x227104
Ghidra address:
0x227104

◆ menuOff

- (void) menuOff

Fades the menu overlay out (only while playing and not in the error or finished state).

Ghidra address:
0x22a724
Ghidra address:
0x22a868
Ghidra address:
0x22a89c

◆ menuOn

- (void) menuOn

Fades the menu overlay in.

Ghidra address:
0x22a5e8
Ghidra address:
0x22a6bc
Ghidra address:
0x22a720

◆ observeValueForKeyPath:ofObject:change:context:

- (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.

Parameters
keyPathThe observed key path.
objectThe observed object.
changeThe change dictionary.
contextThe observer context.
Ghidra address:
0x229690

◆ openErrorNotice

- (void) openErrorNotice

Store lifecycle notice stub (empty in the binary).

Ghidra address:
0x22b048

◆ pause

- (void) pause

Pauses playback and deselects the play button.

Ghidra address:
0x2295c0

◆ pauseCheck

- (void) pauseCheck

Pauses if the play button is currently selected.

Ghidra address:
0x229d28

◆ pauseTimer

- (void) pauseTimer

Suspends the cache timer if it is running.

Ghidra address:
0x229fe0

◆ playAction:

- (void) playAction: (nullable UIButton *) sender

Toggles play/pause; on first play removes the poster and starts the timer.

Parameters
senderThe play button.
Ghidra address:
0x2292a8

◆ playerDidPlayToEndTime:

- (void) playerDidPlayToEndTime: (nullable NSNotification *) notification

Notification handler for AVPlayerItemDidPlayToEndTimeNotification .

Parameters
notificationThe play-to-end notification.
Ghidra address:
0x22996c

◆ repeat

- (void) repeat

Seeks to the start, replays, and reports -movieStart to the delegate.

Ghidra address:
0x2294d8

◆ setAutoPlay

- (void) setAutoPlay

Marks the view to auto-start playback once the movie is ready.

Ghidra address:
0x2272a0

◆ setCacheTimer

- (void) setCacheTimer

Creates and starts the GCD timer that polls the cached duration twice a second.

Ghidra address:
0x229e3c
Ghidra address:
0x229f70
Ghidra address:
0x229fbc

◆ setMovieUrl:posterUrl:movieVoiceFlg:

- (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.

Parameters
movieUrlThe movie URL (cached file or stream).
posterUrlThe poster/banner image URL.
movieVoiceFlg"1" to play with sound, otherwise muted.
Ghidra address:
0x2272b4

◆ setPosterImgWithUrl:

- (void) setPosterImgWithUrl: (nullable NSString *) url

Loads the poster image from the applilink cache and installs it behind the chrome.

Parameters
urlThe poster/banner image URL.
Ghidra address:
0x228c6c

◆ setupTimer

- (void) setupTimer

Installs the periodic remaining-time observer and refreshes the readout once.

Ghidra address:
0x2299f8
Ghidra address:
0x229b78

◆ skipAction:

- (void) skipAction: (nullable id) sender

Pauses playback and reports -movieEnd to the delegate.

Parameters
senderThe originating control.
Ghidra address:
0x229458

◆ soundAction:

- (void) soundAction: (nullable UIButton *) sender

Toggles the movie's volume and the sound indicator's selected state.

Parameters
senderThe sound button.
Ghidra address:
0x229188

◆ storeAction

- (void) storeAction

Pauses playback and reports -storeNotice: to the delegate.

Ghidra address:
0x229224

◆ streamingError

- (void) streamingError

Reports the streaming error, tears the player down, and shows the error overlay.

Ghidra address:
0x22a9c4
Ghidra address:
0x22aac0

◆ streamingTimeoutNowCheck

- (void) streamingTimeoutNowCheck

Fires a streaming error if playback still has not begun when the watchdog elapses.

Ghidra address:
0x22a96c

◆ streamingTimeoutWatch

- (void) streamingTimeoutWatch

Arms the streaming-timeout watchdog.

Ghidra address:
0x22a8fc

◆ syncTimeRemaining

- (void) syncTimeRemaining

Refreshes the remaining-time label and reschedules the pause check.

Ghidra address:
0x229bb0

◆ timeToString:

- (NSString *) timeToString: (float) time

Formats a remaining time in seconds as a mm:ss string.

Parameters
timeThe remaining time in seconds.
Returns
The formatted string.
Ghidra address:
0x229dac
Ghidra address:
0x229dac

◆ touchesBegan:withEvent:

- (void) touchesBegan: (nullable NSSet *) touches
withEvent: (nullable UIEvent *) event 

Toggles the menu overlay on touch.

Parameters
touchesThe touches that began.
eventThe event they belong to.
Ghidra address:
0x22a3ec

Property Documentation

◆ delegate

- (id<VideoViewDelegate>) delegate
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.

◆ gradationButtomView

- (GradationView*) gradationButtomView
readwritenonatomicstrong

The bottom gradient strip that hosts the store button.

Note the binary's misspelling "Buttom".

◆ memuView

- (UIView*) memuView
readwritenonatomicstrong

The menu overlay container.

Note the binary's misspelling "memu".

◆ menuStatus

- (int) menuStatus
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.


The documentation for this class was generated from the following files: