Implementing PC Floating
A guide to implementation to float and view saucelive players within your PC.
Sample Code
<style>
.jw-svg-icon-rewind {
display: none;
}
.jw-icon-fullscreen {
display: none !important;
}
.jw-icon.jw-icon-inline.jw-button-color.jw-reset.jw-icon-pip {
display: none !important;
}
</style>
<div id="player"></div>
<script src="https://cdn.jwplayer.com/libraries/ItMW7Ep3.js"></script>
<script>
var gh = 320;
var gw = 180;
var playerInstance = jwplayer("player").setup({
"file": "https://dl27gtzv7mq2q.cloudfront.net/streams/20220531/lklg-uplus-deb4a3a8178148298d9e0e0fe2b4636a/6380bc9a6cb44df283e86d7d8c156acf_VOD.m3u8",
"height": gh,
"width": gw,
"autostart": "true",
"floating": { "dismissible": true }
});
console.log(playerInstance.getConfig());
playerInstance.on('ready', function(ev) {
console.log('ready');
document.getElementById(playerInstance.id).style.height = 0;
document.getElementById(playerInstance.id).style.width = 0;
playerInstance.setFloating("true");
console.log(playerInstance.getConfig());
});
playerInstance.on('fullscreen', function(ev) {
console.log('fullscreen');
if(ev.fullscreen)
{
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.maxHeight = screen.height;
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.height = screen.height;
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.maxWidth = screen.width;
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.width = screen.width;
pastTransform = jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.transform;
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.transform = '';
console.log(jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style);
}
else
{
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.maxHeight = gh;
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.height = gh;
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.maxWidth = gw;
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.width = gw;
jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style.transform = pastTransform;
console.log(jwplayer().getContainer().getElementsByClassName('jw-wrapper')[0].style);
}
console.log(ev);
});
</script>
<h1>One morning, when Gregor Samsa woke from troubled
dreams.</h1>
<p>One morning, when Gregor Samsa woke from troubled
dreams, he found himself transformed in his bed into
a horrible vermin. He lay on his armour-like back,
and if he lifted his head a little he could see his
brown belly, slightly domed and divided by arches into
stiff sections. The bedding was hardly able to cover
<strong>strong</strong> it and seemed ready to slide
off any moment. His many legs, pitifully thin
compared with the size of the rest of him,
<a class="external ext" href="#">link</a> waved about
helplessly as he looked. "What's happened to me? " he
thought. It wasn't a dream. His room, a proper human
room although a little too small, lay peacefully
between its four familiar walls.</p>
<h1>One morning, when Gregor Samsa woke from troubled
dreams.</h1>
<h2>The bedding was hardly able to cover it.</h2>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<h2>The bedding was hardly able to cover it.</h2>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<ul>
<li>Lorem ipsum dolor sit amet consectetuer.</li>
<li>Aenean commodo ligula eget dolor.</li>
<li>Aenean massa cum sociis natoque penatibus.</li>
</ul>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<form action="#" method="post">
<fieldset>
<label for="name">Name:</label>
<input type="text" id="name" placeholder="Enter your
full name" />
<label for="email">Email:</label>
<input type="email" id="email" placeholder="Enter
your email address" />
<label for="message">Message:</label>
<textarea id="message" placeholder="What's on your
mind?"></textarea>
<input type="submit" value="Send message" />
</fieldset>
</form>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<table class="data">
<tr>
<th>Entry Header 1</th>
<th>Entry Header 2</th>
<th>Entry Header 3</th>
<th>Entry Header 4</th>
</tr>
<tr>
<td>Entry First Line 1</td>
<td>Entry First Line 2</td>
<td>Entry First Line 3</td>
<td>Entry First Line 4</td>
</tr>
<tr>
<td>Entry Line 1</td>
<td>Entry Line 2</td>
<td>Entry Line 3</td>
<td>Entry Line 4</td>
</tr>
<tr>
<td>Entry Last Line 1</td>
<td>Entry Last Line 2</td>
<td>Entry Last Line 3</td>
<td>Entry Last Line 4</td>
</tr>
</table>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<h1>One morning, when Gregor Samsa woke from troubled
dreams.</h1>
<p>One morning, when Gregor Samsa woke from troubled
dreams, he found himself transformed in his bed into
a horrible vermin. He lay on his armour-like back,
and if he lifted his head a little he could see his
brown belly, slightly domed and divided by arches into
stiff sections. The bedding was hardly able to cover
<strong>strong</strong> it and seemed ready to slide
off any moment. His many legs, pitifully thin
compared with the size of the rest of him,
<a class="external ext" href="#">link</a> waved about
helplessly as he looked. "What's happened to me? " he
thought. It wasn't a dream. His room, a proper human
room although a little too small, lay peacefully
between its four familiar walls.</p>
<h1>One morning, when Gregor Samsa woke from troubled
dreams.</h1>
<h2>The bedding was hardly able to cover it.</h2>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<h2>The bedding was hardly able to cover it.</h2>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<ul>
<li>Lorem ipsum dolor sit amet consectetuer.</li>
<li>Aenean commodo ligula eget dolor.</li>
<li>Aenean massa cum sociis natoque penatibus.</li>
</ul>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<form action="#" method="post">
<fieldset>
<label for="name">Name:</label>
<input type="text" id="name" placeholder="Enter your
full name" />
<label for="email">Email:</label>
<input type="email" id="email" placeholder="Enter
your email address" />
<label for="message">Message:</label>
<textarea id="message" placeholder="What's on your
mind?"></textarea>
<input type="submit" value="Send message" />
</fieldset>
</form>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<table class="data">
<tr>
<th>Entry Header 1</th>
<th>Entry Header 2</th>
<th>Entry Header 3</th>
<th>Entry Header 4</th>
</tr>
<tr>
<td>Entry First Line 1</td>
<td>Entry First Line 2</td>
<td>Entry First Line 3</td>
<td>Entry First Line 4</td>
</tr>
<tr>
<td>Entry Line 1</td>
<td>Entry Line 2</td>
<td>Entry Line 3</td>
<td>Entry Line 4</td>
</tr>
<tr>
<td>Entry Last Line 1</td>
<td>Entry Last Line 2</td>
<td>Entry Last Line 3</td>
<td>Entry Last Line 4</td>
</tr>
</table>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<h1>One morning, when Gregor Samsa woke from troubled
dreams.</h1>
<p>One morning, when Gregor Samsa woke from troubled
dreams, he found himself transformed in his bed into
a horrible vermin. He lay on his armour-like back,
and if he lifted his head a little he could see his
brown belly, slightly domed and divided by arches into
stiff sections. The bedding was hardly able to cover
<strong>strong</strong> it and seemed ready to slide
off any moment. His many legs, pitifully thin
compared with the size of the rest of him,
<a class="external ext" href="#">link</a> waved about
helplessly as he looked. "What's happened to me? " he
thought. It wasn't a dream. His room, a proper human
room although a little too small, lay peacefully
between its four familiar walls.</p>
<h1>One morning, when Gregor Samsa woke from troubled
dreams.</h1>
<h2>The bedding was hardly able to cover it.</h2>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<h2>The bedding was hardly able to cover it.</h2>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<ul>
<li>Lorem ipsum dolor sit amet consectetuer.</li>
<li>Aenean commodo ligula eget dolor.</li>
<li>Aenean massa cum sociis natoque penatibus.</li>
</ul>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<form action="#" method="post">
<fieldset>
<label for="name">Name:</label>
<input type="text" id="name" placeholder="Enter your
full name" />
<label for="email">Email:</label>
<input type="email" id="email" placeholder="Enter
your email address" />
<label for="message">Message:</label>
<textarea id="message" placeholder="What's on your
mind?"></textarea>
<input type="submit" value="Send message" />
</fieldset>
</form>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
<table class="data">
<tr>
<th>Entry Header 1</th>
<th>Entry Header 2</th>
<th>Entry Header 3</th>
<th>Entry Header 4</th>
</tr>
<tr>
<td>Entry First Line 1</td>
<td>Entry First Line 2</td>
<td>Entry First Line 3</td>
<td>Entry First Line 4</td>
</tr>
<tr>
<td>Entry Line 1</td>
<td>Entry Line 2</td>
<td>Entry Line 3</td>
<td>Entry Line 4</td>
</tr>
<tr>
<td>Entry Last Line 1</td>
<td>Entry Last Line 2</td>
<td>Entry Last Line 3</td>
<td>Entry Last Line 4</td>
</tr>
</table>
<p>It showed a lady fitted out with a fur hat and fur
boa who sat upright, raising a heavy fur muff that
covered the whole of her lower arm towards the
viewer.</p>
As you can see from the sample, you can set the m3u8 file in the file.
If you check the response value using [Specific Broadcast Inquiry API] (https://docs.sauce.im/reference/) for the video to be set in the file, you will receive a reply as below, and you can use the value of path among them.
You can use a specific broadcast inquiry API to get information on the video to be played.
For API inquiry, please refer to the document [Specific Broadcast Inquiry API] (https://docs.sauce.im/reference/) ). (For customer company information, use the information delivered by the person in charge of Moby-Doo is used.)
You can check the broadcastId through API inquiry at the URL, and if you need the broadcastId value when clicking a product or clicking a banner, please request the person in charge of Mobidoo.
"outputInfo":[
{
"preview":"https://dl27gtzv7mq2q.cloudfront.net/streams/20220602/lklg-uplus-70c3f72a95a94bbc91abf654d2989961/f1b81fa91bf44af9ba309cbf811dbd26_preview_VOD.mp4",
"bucketName":"sauceflex-streams",
"cloudFront":"dl27gtzv7mq2q.cloudfront.net",
"path":"https://dl27gtzv7mq2q.cloudfront.net/streams/20220602/lklg-uplus-70c3f72a95a94bbc91abf654d2989961/f1b81fa91bf44af9ba309cbf811dbd26_VOD.m3u8",
"downloadUrl":"https://dl27gtzv7mq2q.cloudfront.net/streams/20220602/lklg-uplus-70c3f72a95a94bbc91abf654d2989961/f1b81fa91bf44af9ba309cbf811dbd26_orignal.000000.m2ts",
"type":"aws",
"keyPrefix":"streams/20220602/lklg-uplus-70c3f72a95a94bbc91abf654d2989961",
"key":"streams/20220602/lklg-uplus-70c3f72a95a94bbc91abf654d2989961/f1b81fa91bf44af9ba309cbf811dbd26_VOD.m3u8"
}
],
Updated about 1 year ago