Radiant Media Player

SEI packets with resolution payloadType 5 with HLS



Documentation sections


Scope of support

The player will parse SEI packets with resolution payloadType 5 based on H.264 specification for HLS (for default hls.js based streaming). Now you can write custom data to a HLS H.264 stream and get those data from API method getMetadata upon meta API event.


Getting SEI packets custom data through player API

SEI packets custom data API event

meta: this event fires each time new SEI packets custom data are available

SEI packets custom data API method

getMetadata()

When invoked, this method will return Object|null representing the current SEI packets custom data. The returned Object when available will have the following structure:

{
  data: {
    samples: [
      pts: 0,
      payloadType: 5,
      uuid: "8fbb6c74-7c3e-4f78-9f7-8cb35d3c177e",
      userDataBytes: Object,
      userData: "some user data"
    ]
  },
  type: "sei"
}

Player code example

<script src="https://cdn.radiantmediatechs.com/rmp/5.6.1/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
  var src = {
    hls: 'your-hls-stream-with-sei-packets-with-resolution-payloadType-5'
  };
  var settings = {
    licenseKey: 'your-license-key',
    src: src,
    width: 640,
    height: 360
  };
  var elementID = 'rmpPlayer';
  var rmp = new RadiantMP(elementID);
  var rmpContainer = document.getElementById('rmpPlayer');
  // We listen to meta API event
  rmpContainer.addEventListener('meta', function () {
    // Each time meta event fires, getMetadata API method is updated and can be queried
    console.log(rmp.getMetadata());
  });
  rmp.init(settings);
</script>
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.