Skip to content

Commit

Permalink
Merge pull request #178 from IBM/work/IVSC-375
Browse files Browse the repository at this point in the history
Change live stream urls
  • Loading branch information
bkarolyi authored Jul 15, 2024
2 parents 3dd7302 + afb5768 commit c0cf4c9
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 23 deletions.
10 changes: 5 additions & 5 deletions src/components/EmbedPlayer/Controls/multi.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React, { useState } from 'react';
import cx from 'classnames';
import imgMulti1 from '../../../images/example-multiview-1.png';
import * as styles from './index.module.scss';

const views = [
{
url: 'https://ustvstaticcdn1-a.akamaihd.net/i/channel/live/1_6540154,640x360,b:2020091508.jpg',
url: 'https://ustvstaticcdn1-a.akamaihd.net/i/channel/live/1_25964588,640x360,b:2020091508.jpg',
type: 'channel',
id: 6540154,
id: 25964588,
},
{
url: 'https://ustvstaticcdn1-a.akamaihd.net/i/channel/live/1_17074538,640x360,b:2020091508.jpg',
Expand All @@ -21,7 +20,8 @@ const views = [
},
];

export const MultiControls = ({ onMediaChange, ready }) => {
// eslint-disable-next-line import/prefer-default-export
export function MultiControls({ onMediaChange, ready }) {
const [selected, setSelected] = useState(0);

return (
Expand Down Expand Up @@ -57,4 +57,4 @@ export const MultiControls = ({ onMediaChange, ready }) => {
})}
</div>
);
};
}
11 changes: 5 additions & 6 deletions src/components/EmbedPlayer/Modules/MediaSwitcher.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Media } from './ExampleMedia';
import imgIBM from '../../../images/example-channel-ibm.jpg';
import imgNASA from '../../../images/example-channel-nasa.jpg';
import imgDemo from '../../../images/example-channel-demo.jpg';

const medias = [
{
Expand All @@ -12,12 +12,11 @@ const medias = [
imgUrl: imgIBM,
},
{
title: 'NASA Public',
title: 'Demo channel',
type: 'channel',
id: 6540154,
description:
'NASA TV airs a variety of regularly scheduled, pre-recorded educational and public relations programming 24 hours a day on its various channels.',
imgUrl: imgNASA,
id: 25964588,
description: 'Demo channel',
imgUrl: imgDemo,
},
];

Expand Down
Binary file added src/images/example-channel-demo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/images/example-channel-nasa.jpg
Binary file not shown.
Binary file removed src/images/example-channel-twit.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/pages/player-api-examples/multiple-instances.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Multiple instances
import EmbedPlayer from '../../components/EmbedPlayer';

<EmbedPlayer
src="https://video.ibm.com/embed/6540154?volume=0"
src="https://video.ibm.com/embed/25964588?volume=0"
controls={['basic']}
/>

Expand Down
12 changes: 6 additions & 6 deletions src/pages/player-api-examples/multiview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This feature of the Embed API can be used in various use cases, like switching b
### Example

<EmbedPlayer
src="https://video.ibm.com/embed/6540154"
src="https://video.ibm.com/embed/25964588"
controls={['multi']}
/>

Expand All @@ -29,7 +29,7 @@ This feature of the Embed API can be used in various use cases, like switching b
<div class="player-container">
<iframe
id="MultiviewPlayer"
src="//video.ibm.com/embed/6540154"
src="//video.ibm.com/embed/25964588"
frameborder="0"
allowfullscreen
webkitallowfullscreen
Expand All @@ -42,11 +42,11 @@ This feature of the Embed API can be used in various use cases, like switching b
<div class="multiview-chooser">
<ul>
<li>
<a href="#" class="active" data-app="channel" data-id="6540154">
<a href="#" class="active" data-app="channel" data-id="25964588">
<img
<!-- users can override it with custom images -->
src="https://ustvstaticcdn1-a.akamaihd.net/i/channel/live/1_6540154,640x360,b:2020091508.jpg"
alt="NASA Public-Education"
src="https://ustvstaticcdn1-a.akamaihd.net/i/channel/live/1_25964588,640x360,b:2020091508.jpg"
alt="Demo channel"
/>
</a>
</li>
Expand All @@ -62,7 +62,7 @@ This feature of the Embed API can be used in various use cases, like switching b
<a href="#" data-app="channel" data-id="10414700">
<img
src="https://ustvstaticcdn1-a.akamaihd.net/i/channel/live/1_10414700,640x360,b:2020090903.jpg"
alt="NASA TV Media"
alt="Demo channel"
/>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/player-api-url-parameters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ There are a lot of options to configure the feature set and behavior during play
This example shows an iframe in which the player would hide the title bar, the LIVE badge and the viewer numbers from viewers:

```html
<iframe id="PlayerIframe" src="https://video.ibm.com/embed/6540154?hideTitle&hideLiveBadge&hideViewerNumbers" width="640" height="480" allowfullscreen webkitallowfullscreen referrerpolicy="no-referrer-when-downgrade"></iframe>
<iframe id="PlayerIframe" src="https://video.ibm.com/embed/25964588?hideTitle&hideLiveBadge&hideViewerNumbers" width="640" height="480" allowfullscreen webkitallowfullscreen referrerpolicy="no-referrer-when-downgrade"></iframe>
```

## URL parameters to change the behavior of the Player
Expand Down
8 changes: 4 additions & 4 deletions src/pages/player-api-usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Loads a channel or a video in the player. Requires two additional arguments:

```js
viewer.callMethod('load', 'video', 5903947);
viewer.callMethod('load', 'channel', 6540154);
viewer.callMethod('load', 'channel', 25964588);
```

### seek
Expand Down Expand Up @@ -242,7 +242,7 @@ Get the current content type and ID as an array.

```js
viewer.getProperty('content', function (content) {
// content == ['channel', 6540154]
// content == ['channel', 25964588]
// or
// content == ['recorded', 12345678]
...
Expand All @@ -256,10 +256,10 @@ Get the actual content type and ID as an array. This will return the currently p
###### Example

```js
viewer.callMethod('load', 'channel', 6540154);
viewer.callMethod('load', 'channel', 25964588);
// ...
viewer.getProperty('playingContent', function (content) {
// content == ['channel', 6540154]
// content == ['channel', 25964588]
// - if it's live, or
// content == ['recorded', 123456]
// - if it's off-air and has off-air video content, or
Expand Down

0 comments on commit c0cf4c9

Please sign in to comment.