Interface PresentationRequest

All Superinterfaces:
MediaSource

public interface PresentationRequest extends MediaSource
A JavaScript PresentationRequest.
 
     browser.set(StartPresentationCallback.class, (params, tell) -> {
         Optional<MediaReceiver> mediaReceiver =
                 params.list()
                       .stream()
                       .filter(it -> it.name().startsWith("Samsung TV"))
                       .findAny();
         if (mediaReceiver.isPresent()) {
             MediaReceiver samsungTv = mediaReceiver.get();
             if (samsungTv.supports(params.presentationRequest())) {
                 tell.start(samsungTv);
             } else {
                 tell.cancel();
             }
         } else {
             tell.cancel();
         }
     });
 
 
Since:
7.29
  • Method Summary

    Modifier and Type
    Method
    Description
    default Frame
    Returns the frame where the presentation has been requested.
    default String
    Returns the origin of the frame where the presentation has been requested.
    default List<String>
    Returns the list of URLs whose content will be cast.
  • Method Details

    • presentationUrls

      default List<String> presentationUrls()
      Returns the list of URLs whose content will be cast.
    • origin

      default String origin()
      Returns the origin of the frame where the presentation has been requested.
    • frame

      default Frame frame()
      Returns the frame where the presentation has been requested.