-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ustream): corrects the url for ustream #215
Conversation
I think it works good even now https://codepen.io/ritz078/pen/QpKQQy . Can you fork this and give an example where this doesn't work ? I am using v4.1.16. Edit: Ustream is broken because the |
Everything woks fine on codepen but on my system, using the file demo/index.html, this appears with old code: |
In that case can't add |
src/js/modules/template.js
Outdated
@@ -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>` | |||
console.log("ustream"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
src/js/modules/template.js
Outdated
console.log(id); | ||
//check if '//www.' is there in the link | ||
if(match.indexOf('/www\.ustream\.tv/') < 0){ | ||
return `<div class="ejs-embed ejs-ustream"><iframe src="//www.${id.join('/')}" height="${options.videoHeight}" width="${options.videoWidth}"></iframe></div>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prevent multiple returns instead assign the src to a variable and use that in the template.
Also I see test is breaking |
removes a return statement
Update ustream function
Have you tested with any example ? |
This issue was not mentioned but the rendered link was not valid for ustream .This commit fixes that issue.