Skip to content

Commit

Permalink
[FIX] video message recording, issue #11651 (#12031)
Browse files Browse the repository at this point in the history
Closes #11651 

This was broken by adding a wrong css class in [this commit](831f757#diff-ff868971f6509568c40009e48cbae836), causing the wrong click handler to be executed.

Also removed a warning about the deprecated api `createObjectURL`.
  • Loading branch information
flaviogrossi authored and ggazzo committed Sep 18, 2018
1 parent edc6ceb commit 672e038
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/rocketchat-ui-vrecord/client/vrecord.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</button>
<span class="buttons__wrapper">
<button class="rc-button rc-button--nude rc-button--small cancel">{{_ "Cancel"}}</button>
<button class="rc-button rc-button--primary record rc-button--small ok {{okDisabled}}" {{okDisabled}}>{{_ "Ok"}}</button>
<button class="rc-button rc-button--primary rc-button--small ok {{okDisabled}}" {{okDisabled}}>{{_ "Ok"}}</button>
</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ this.VideoRecorder = new class {

startUserMedia(stream) {
this.stream = stream;
this.videoel.src = URL.createObjectURL(stream);
try {
this.videoel.srcObject = stream;
} catch (_e) {
this.videoel.src = URL.createObjectURL(stream);
}
this.videoel.onloadedmetadata = () => this.videoel.play();

this.started = true;
Expand Down

0 comments on commit 672e038

Please sign in to comment.