Skip to content

Commit 48529f4

Browse files
committed
Remove default playlist for any unknown clients
1 parent ad62851 commit 48529f4

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/App.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const CLIENT = getClient();
4646

4747
class App extends React.Component {
4848
static getVideos(url, client) {
49-
let endpoint = `https://uat.suggestv.io/semantics?url=${url}`;
49+
let endpoint = `https://uat.suggestv.io/semantics?url=${url}&skipcache=true`;
5050

5151
if (client === 'telegraph') {
5252
endpoint += `&client=${client}`;
@@ -234,7 +234,7 @@ class App extends React.Component {
234234
}
235235

236236
function setDefaultClientVideos(ctx) {
237-
videos = ctx.state.spectator;
237+
videos = [];
238238

239239
if (CLIENT === 'localhost') videos = ctx.state.telegraph;
240240
if (CLIENT === 'telegraph') videos = ctx.state.telegraph;
@@ -318,6 +318,11 @@ class App extends React.Component {
318318

319319
render() {
320320
const url = window.location.href;
321+
if (!this.state.videos || !this.state.videos.length) {
322+
console.log('SUGGESTV: No videos to show');
323+
return null;
324+
}
325+
321326
return (
322327
<Player
323328
ref={p => (this.playerNode = p)}
@@ -338,7 +343,6 @@ class App extends React.Component {
338343
/>
339344
);
340345
}
341-
342346
}
343347

344348
export default App;

0 commit comments

Comments
 (0)