+
+ private loadP2PMediaLoaderResolutions () {
+ this.resolutions = []
+
+ const qualityLevels = this.embed.player.qualityLevels()
+ const currentResolutionId = this.embed.player.qualityLevels().selectedIndex
+
+ for (let i = 0; i < qualityLevels.length; i++) {
+ const level = qualityLevels[i]
+
+ this.resolutions.push({
+ id: level.id,
+ label: level.height + 'p',
+ active: level.id === currentResolutionId,
+ width: level.width,
+ height: level.height
+ })
+ }
+
+ this.channel.notify({
+ method: 'resolutionUpdate',
+ params: this.resolutions
+ })
+ }
+
+ private isWebtorrent () {
+ return this.embed.player.webtorrent
+ }