public abstract class BoxPreviewMediaFragment extends BoxPreviewDefaultFragment implements BoxPlayer.Listener
BoxPreviewFragment.BoxPreviewController, BoxPreviewFragment.Listener| Modifier and Type | Field and Description |
|---|---|
protected AudioCapabilities |
mAudioCapabilities |
protected AudioCapabilitiesReceiver |
mAudioReceiver |
protected android.view.ViewGroup |
mMediaControlAnchorView |
protected BoxMediaControls |
mPlayer |
protected android.view.View |
mSurfaceView |
mIsErrorShowing, mReportsTransferBytesEXTRA_BOX_ITEM, EXTRA_POSITION, EXTRA_PREVIEW_LOADED, EXTRA_THUMBNAIL_LOADED, MANDATORY_BOX_FILE_FIELDS, mController, mPosition, mPreviewLoaded, mReceiver, mThumbnailLoaded| Constructor and Description |
|---|
BoxPreviewMediaFragment() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canInitPlayer()
Returns whether all the components required by the player are ready and available
|
<E extends BoxObject> |
checkTasksBeforeExecute(InspectableBoxFutureTask request)
Checks if the request has already been added to the task queue.
|
protected abstract RendererBuilder |
getBuilder()
Gets the builder that creates the appropriate rendering for the player
|
BoxMediaControls |
getMediaControls() |
protected android.net.Uri |
getMediaUri() |
protected abstract BoxApiPreview.Extensions |
getPreviewExtension()
Gets the extension that will be used with the preview endpoint
|
protected void |
initPlayer()
Initializes the player and notifies the activity that the fragment is ready
|
protected void |
notifyFragmentLoaded()
Notifies listeners that all necessary components required by the preview fragment are loaded and ready
|
void |
onAudioCapabilitiesChanged(AudioCapabilities audioCapabilities) |
protected void |
onBoxRequestError(BoxResponse response) |
protected void |
onBoxRequestSuccess(BoxResponse response) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onDestroy() |
void |
onDestroyView() |
void |
onErrorOccurred(java.lang.Exception ex) |
void |
onPause() |
void |
onResume() |
void |
onTaskCompleted(java.util.concurrent.FutureTask task,
java.util.Collection<java.util.concurrent.FutureTask> tasks,
PreviewStorage storage) |
void |
onVideoSizeChanged(int width,
int height,
float pixelWidthAspectRatio) |
void |
releasePlayer() |
void |
setPreviewController(BoxPreviewFragment.BoxPreviewController controller) |
protected void |
updateLoadingStatus() |
getProgressBar, getVisibleViews, hideError, hideProgress, initDefaultViews, isContainerVisible, loadContent, onActivityCreated, onCreate, onSaveInstanceState, onStart, restartDownload, restoreStatus, setProgress, showProgress, showUnavailablecancelLoadContent, checkTasksBeforeExecute, createInstance, execute, getBoxFile, getBoxSession, getIntentFilter, getPosition, getPreviewController, handleMessage, isContentLoading, loadContent, notifyFragmentUnloaded, onDetach, onInternetConnectionChanged, setUserVisibleHint, showNetworkUnavailableprotected BoxMediaControls mPlayer
protected android.view.ViewGroup mMediaControlAnchorView
protected android.view.View mSurfaceView
protected AudioCapabilitiesReceiver mAudioReceiver
protected AudioCapabilities mAudioCapabilities
@Nullable
public android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
onCreateView in class BoxPreviewDefaultFragmentpublic void setPreviewController(BoxPreviewFragment.BoxPreviewController controller)
setPreviewController in class BoxPreviewFragmentprotected void onBoxRequestSuccess(BoxResponse response)
onBoxRequestSuccess in class BoxPreviewDefaultFragmentprotected void onBoxRequestError(BoxResponse response)
onBoxRequestError in class BoxPreviewDefaultFragmentpublic void onTaskCompleted(java.util.concurrent.FutureTask task,
java.util.Collection<java.util.concurrent.FutureTask> tasks,
PreviewStorage storage)
onTaskCompleted in class BoxPreviewFragmentpublic void onResume()
onResume in class BoxPreviewFragmentpublic void onPause()
onPause in class BoxPreviewFragmentpublic void onDestroy()
onDestroy in class BoxPreviewFragmentpublic void onDestroyView()
public void onAudioCapabilitiesChanged(AudioCapabilities audioCapabilities)
public void onVideoSizeChanged(int width,
int height,
float pixelWidthAspectRatio)
onVideoSizeChanged in interface BoxPlayer.Listenerpublic void onErrorOccurred(java.lang.Exception ex)
onErrorOccurred in interface BoxPlayer.Listenerprotected void notifyFragmentLoaded()
BoxPreviewFragmentnotifyFragmentLoaded in class BoxPreviewFragmentprotected android.net.Uri getMediaUri()
protected abstract RendererBuilder getBuilder()
protected abstract BoxApiPreview.Extensions getPreviewExtension()
public <E extends BoxObject> <any> checkTasksBeforeExecute(InspectableBoxFutureTask request)
BoxPreviewFragmentcheckTasksBeforeExecute in class BoxPreviewFragmentE - return type for the request that extends from {BoxObject}request - the inspectable request to try executingprotected void updateLoadingStatus()
protected boolean canInitPlayer()
protected void initPlayer()
public void releasePlayer()
public BoxMediaControls getMediaControls()