Skip to content

Commit

Permalink
fix(ustream): corrects the url for ustream (#215)
Browse files Browse the repository at this point in the history
* corrects the url for ustream

* check for the presence of www. in the ustream link

* checks for both integer and string

* Update ustream function

removes a return statement
  • Loading branch information
SnehaMidha authored and ritz078 committed Mar 8, 2017
1 parent 54a1bfd commit 6b9e165
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/js/modules/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ export default {
if (match.indexOf('/embed/') < 0) {
id.splice(1, 0, 'embed')
}
return `<div class="ejs-embed ejs-ustream"><iframe src="//www.${id.join('/')}" height="${options.videoHeight}" width="${options.videoWidth}"></iframe></div>`

//check if '//www.' is there in the link
let prefix='';
if(match.indexOf('/www\.ustream\.tv/') < 0){
prefix=prefix+'//www.';
}

return `<div class="ejs-embed ejs-ustream"><iframe src="${prefix}${id.join('/')}" height="${options.videoHeight}" width="${options.videoWidth}"></iframe></div>`
},

detailsVimeo (data, fullData, embedUrl) {
Expand Down

0 comments on commit 6b9e165

Please sign in to comment.