Skip to content
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

[NEW] Livestream tab #9255

Merged
merged 35 commits into from
Jan 31, 2018
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
94d41bf
Add tab to embed livestreaming videos on channel
gdelavald Dec 27, 2017
b3c4af0
Add option to enable livestream tab
gdelavald Dec 27, 2017
166c2fd
Adds support for youtube, vimeo and twitch-channel urls
gdelavald Dec 27, 2017
a40fd3b
Enable twitch channel embeds
gdelavald Dec 27, 2017
6422e50
Remove unused else
gdelavald Dec 27, 2017
6b56020
Fixes twitch parsing on channels
gdelavald Dec 27, 2017
5214b8d
Fix error when url not parseable, add podcast icon
gdelavald Dec 27, 2017
9861349
Allow editing when url is empty
gdelavald Dec 27, 2017
fef945e
Adds popout component & basic popout functionality
gdelavald Dec 28, 2017
b45235b
Styling on popout component and livestream tab
gdelavald Dec 29, 2017
bdd83a7
Add popout remove callback on logout
gdelavald Dec 29, 2017
adc37a5
Add english strings, enable cancel button
gdelavald Dec 29, 2017
c5a5955
Styling changes and small fixes
gdelavald Dec 29, 2017
a078f7e
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat i…
gdelavald Dec 29, 2017
7bc50ee
Missing string translation
gdelavald Dec 29, 2017
b01bf45
Fix for empty url on livestream source
gdelavald Dec 29, 2017
d7a8328
Replace iframe with html object, improve popout features
gdelavald Jan 2, 2018
66be235
Improvements to switching rooms with livestreams and styling
gdelavald Jan 3, 2018
f08dc01
Resolve exception when closing popout from different channel
gdelavald Jan 3, 2018
bfb924a
Added popout drag-n-drop
gdelavald Jan 12, 2018
567d18f
Prevent file drag n drop from interfering with popout component
gdelavald Jan 12, 2018
2a4e51f
Adds new styling and improvements for popout behavior
gdelavald Jan 15, 2018
4f85652
Add new styling for livestreamtab
gdelavald Jan 15, 2018
419ae83
Hide player on toggled version, improvements to style
gdelavald Jan 15, 2018
8c68e4d
Layout changes to popout component
gdelavald Jan 17, 2018
f4f191e
Changes icons, add audio only mode
gdelavald Jan 18, 2018
1cc9e2c
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat i…
gdelavald Jan 30, 2018
e8f1641
Fix conflicts and update style to match new contextual bar
gdelavald Jan 30, 2018
bcb02fa
Small style enhancement
gdelavald Jan 30, 2018
4ca0056
Small style enhancement 2
gdelavald Jan 30, 2018
38346c2
Removing package-lock for some reason
gdelavald Jan 30, 2018
bac24ba
Small refactor on method name
gdelavald Jan 30, 2018
51eaedb
fix linter
ggazzo Jan 30, 2018
3ce7070
Merge branch 'livestream-tab' of https://github.com/RocketChat/Rocket…
gdelavald Jan 30, 2018
14a7c43
Improves drag-n-drop ux
gdelavald Jan 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ rocketchat:katex
rocketchat:ldap
rocketchat:lib
rocketchat:livechat
rocketchat:livestream
rocketchat:logger
rocketchat:login-token
rocketchat:mailer
Expand Down
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ rocketchat:katex@0.0.1
rocketchat:ldap@0.0.1
rocketchat:lib@0.0.1
rocketchat:livechat@0.0.1
rocketchat:livestream@0.0.5
rocketchat:logger@0.0.1
rocketchat:login-token@1.0.0
rocketchat:mailer@0.0.1
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Meteor.methods({
method: 'saveRoomSettings'
});
}
if (!['roomName', 'roomTopic', 'roomAnnouncement', 'roomDescription', 'roomType', 'readOnly', 'reactWhenReadOnly', 'systemMessages', 'default', 'joinCode', 'tokenpass'].some((s) => s === setting)) {
if (!['roomName', 'roomTopic', 'roomAnnouncement', 'roomDescription', 'roomType', 'readOnly', 'reactWhenReadOnly', 'systemMessages', 'default', 'joinCode', 'tokenpass', 'streamingOptions'].some((s) => s === setting)) {
throw new Meteor.Error('error-invalid-settings', 'Invalid settings provided', {
method: 'saveRoomSettings'
});
Expand Down Expand Up @@ -75,6 +75,9 @@ Meteor.methods({
});
RocketChat.saveRoomTokenpass(rid, value);
break;
case 'streamingOptions':
RocketChat.saveStreamingOptions(rid, value);
break;
case 'readOnly':
if (value !== room.ro) {
RocketChat.saveRoomReadOnly(rid, value, Meteor.user());
Expand Down
7 changes: 7 additions & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,13 @@
"Livechat_title": "Livechat Title",
"Livechat_title_color": "Livechat Title Background Color",
"Livechat_Users": "Livechat Users",
"Livestream_title": "LiveStream",
"Livestream_not_found": "Livestream not Available",
"Livestream_popout": "Open Livestream in Popout",
"Livestream_url": "Livestream source url",
"Livestream_source_changed_succesfully": "Livestream source changed successfully",
"Livestream_undocked": "Livestream is undocked",
"Livestream_switch_to_room": "Switch to current room's livestream",
"Load_more": "Load more",
"Loading...": "Loading...",
"Loading_more_from_history": "Loading more from history",
Expand Down
34 changes: 17 additions & 17 deletions packages/rocketchat-livechat/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions packages/rocketchat-livestream/client/styles/liveStreamTab.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.contextual-bar__header-title {
padding: 5px;
&h2 {
font-size: 20px;
}
}

.thumbnail-container {
position: relative;
height: 270px;

& .--absolute-center {
position: absolute;
top: calc(50% - 25px);
left: calc(50% - 25px);

font-size: 50px;
}
& .--play-solid {
fill: var(--rc-color-primary-lightest);;
}
}
.liveStreamTab__form {
margin: 10px auto;

& .rc-button {
width: 49%;
}
& .rc-switch {
padding: 10px 5px;
}
}

.livestream--url {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

margin: 10px auto;
padding: 10px 0;
font-size: 15px;

& .current-setting {
display: inline-block;
text-decoration: none;
color: var(--rc-color-primary-dark);
}

& .rc-button {
width: 49%
}
}
16 changes: 16 additions & 0 deletions packages/rocketchat-livestream/client/tabBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Meteor.startup(function() {
Tracker.autorun(function() {
if (RocketChat.settings.get('Livestream_enabled')) {
return RocketChat.TabBar.addButton({
groups: ['channel', 'group'],
id: 'livestream',
i18nTitle: 'Livestream',
icon: 'podcast',
template: 'liveStreamTab',
order: 3
});
} else {
RocketChat.TabBar.removeButton('livestream');
}
});
});
56 changes: 56 additions & 0 deletions packages/rocketchat-livestream/client/views/liveStreamTab.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<template name="liveStreamTab">
<div class="contextual-bar__header flex-tab__header flex-tab--livestream">
<div class="title contextual-bar__header-data">
<h2 class="contextual-bar__header-title">{{> icon block="contextual-bar__header-icon" icon="podcast"}} {{_ "Livestream_title" }}</h2>
</div>
</div>
<section class="contextual-bar__content flex-tab-bar">
{{#if hasSource}}
{{#if isPopoutOpen}}
{{#if canDock}}
<button type="button" class="rc-button rc-button--primary js-close button-block" title="{{_ 'Livestream_close'}}" >{{_ "Livestream_close"}}</button>
{{else}}
<button type="button" class="rc-button rc-button--primary js-close button-block" title="{{_ 'Livestream_switch_to_room'}}" >{{_ "Livestream_switch_to_room"}}</button>
{{/if}}
{{else}}
<!-- {{> liveStreamView streamingSource=streamingSource }} -->
{{#if hasThumbnail}}
<div class="thumbnail-container" style="background: url({{thumbnailUrl}}) 100% no-repeat no-repeat;">
<a href="#" class="js-popout --absolute-center">
{{> icon icon="play-solid"}}
</a>
</div>
{{/if}}
{{/if}}
{{else}}
{{_ "Livestream_not_found" }}
{{/if}}
{{#if canEdit}}
{{#if editing}}
<form class="liveStreamTab__form">
<input type="text" name="streaming-source" class="rc-input__element content-background-color editing" placeholder="{{_ "Livestream_url"}}" value="{{ streamingSource }}"/>
<div class="rc-switch">
<label class="rc-switch__label" tabindex="-1">
<input type="checkbox" class="rc-switch__input" name="streaming-audio-only" checked={{isAudioOnly}}>
<span class="rc-switch__button">
<span class="rc-switch__button-inside"></span>
</span>
<span class="rc-switch__text">
{{_ "Livestream_enable_audio_only"}}
</span>
</label>
<span class="rc-switch__description">{{typeDescription}}</span>
</div>
<button type="button" class="rc-button rc-button--nude js-cancel button-block" title="{{_ 'Cancel'}}" >{{_ "Cancel"}}</button>
<button type="button" class="rc-button rc-button--primary js-save button-block">{{_ "Save"}}</button>
</form>
{{else}}
<div class="setting-block livestream--url">
{{> icon icon="permalink"}}
<a href="#" class="current-setting streaming-source-settings"> {{ streamingSource }} </a>
</div>
{{/if}}
{{/if}}

</section>
</template>
Loading