Tabnine Logo
PlayerSurfaceHolder.create
Code IndexAdd Tabnine to your IDE (free)

How to use
create
method
in
com.novoda.noplayer.PlayerSurfaceHolder

Best Java code snippets using com.novoda.noplayer.PlayerSurfaceHolder.create (Showing top 6 results out of 315)

origin: novoda/no-player

@Test
public void whenCreatingPlayerSurfaceHolderWithSurfaceView_thenAttachCallbackToSurfaceHolder() {
  PlayerSurfaceHolder.create(surfaceView);
  verify(surfaceHolder).addCallback(any(PlayerViewSurfaceHolder.class));
}
origin: novoda/no-player

@Test
public void whenCreatingPlayerSurfaceHolderWithTextureView_thenAttachSurfaceTextureListenerToTextureView() {
  PlayerSurfaceHolder.create(textureView);
  verify(textureView).setSurfaceTextureListener(any(PlayerViewSurfaceHolder.class));
}
origin: novoda/no-player

@Override
protected void onFinishInflate() {
  super.onFinishInflate();
  View.inflate(getContext(), R.layout.noplayer_view, this);
  videoFrame = findViewById(R.id.video_frame);
  shutterView = findViewById(R.id.shutter);
  surfaceView = findViewById(R.id.surface_view);
  subtitleView = findViewById(R.id.subtitles_layout);
  playerSurfaceHolder = PlayerSurfaceHolder.create(surfaceView);
}
origin: novoda/no-player

@Test
public void givenPlayerSurfaceHolderContainsSurfaceView_whenAttachingVideoPlayer_thenSetsVideoSurfaceView() {
  PlayerSurfaceHolder playerSurfaceHolder = PlayerSurfaceHolder.create(surfaceView);
  playerSurfaceHolder.attach(videoPlayer);
  verify(videoPlayer).setVideoSurfaceView(surfaceView);
}
origin: novoda/no-player

@Test
public void givenPlayerSurfaceHolderContainsTextureView_whenAttachingVideoPlayer_thenSetsVideoTextureView() {
  PlayerSurfaceHolder playerSurfaceHolder = PlayerSurfaceHolder.create(textureView);
  playerSurfaceHolder.attach(videoPlayer);
  verify(videoPlayer).setVideoTextureView(textureView);
}
origin: novoda/no-player

@Before
public void setUp() {
  ExoPlayerCreator exoPlayerCreator = mock(ExoPlayerCreator.class);
  given(exoPlayerForwarder.drmSessionEventListener()).willReturn(drmSessionEventListener);
  given(exoPlayerForwarder.mediaSourceEventListener()).willReturn(mediaSourceEventListener);
  given(bandwidthMeterCreator.create(anyLong())).willReturn(defaultBandwidthMeter);
  given(trackSelectorCreator.create(OPTIONS, defaultBandwidthMeter)).willReturn(trackSelector);
  given(exoPlayerCreator.create(drmSessionCreator, drmSessionEventListener, mediaCodecSelector, trackSelector.trackSelector())).willReturn(exoPlayer);
  given(rendererTypeRequesterCreator.createfrom(exoPlayer)).willReturn(rendererTypeRequester);
  facade = new ExoPlayerFacade(
      bandwidthMeterCreator,
      androidDeviceVersion,
      mediaSourceFactory,
      trackSelectorCreator,
      exoPlayerCreator,
      rendererTypeRequesterCreator
  );
  given(surfaceView.getHolder()).willReturn(mock(SurfaceHolder.class));
  surfaceViewHolder = PlayerSurfaceHolder.create(surfaceView);
  textureViewHolder = PlayerSurfaceHolder.create(textureView);
}
com.novoda.noplayerPlayerSurfaceHoldercreate

Popular methods of PlayerSurfaceHolder

  • <init>
  • attach
  • getSurfaceRequester
  • containsSurfaceView
  • containsTextureView

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Collectors (java.util.stream)
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now