Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next-minor' into develop
- Loading branch information
Showing
16 changed files
with
240 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
$stub-bg-color: #ddd; | ||
|
||
.media-embed { | ||
margin-top: 5px; | ||
|
||
.thumb { | ||
@include video-overlay; | ||
|
||
background-color: $stub-bg-color; | ||
|
||
video { | ||
min-height: 60%; | ||
vertical-align: middle; | ||
width: 100%; | ||
} | ||
} | ||
|
||
audio { | ||
width: 100%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="media-embed"> | ||
{{#if needsCover}} | ||
<div class="thumb"> | ||
{{/if}} | ||
|
||
<{{mediaType}} {{{attributes}}}> | ||
<source type="{{mimetype}}" src="{{sourceURL}}" /> | ||
{{title}} | ||
</{{mediaType}}> | ||
|
||
{{#if needsCover}} | ||
<div class="video-overlay"> | ||
<div class="video-info"> | ||
<div class="title">{{title}}</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{/if}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# We can create a separate cucumber profile that will run these tests with Selenium | ||
@nophantomjs | ||
@javascript | ||
Feature: oembed | ||
In order to make videos easy accessible | ||
As a user | ||
I want the media links in my posts be replaced by an embedded player | ||
|
||
Background: | ||
Given following user exists: | ||
| username | email | | ||
| Alice Smith | alice@alice.alice | | ||
And I sign in as "alice@alice.alice" | ||
|
||
Scenario: Post a video link | ||
When I click the publisher and post "[title](http://example.com/file.ogv)" | ||
Then I should see a HTML5 video player | ||
|
||
Scenario: Post an audio link | ||
When I click the publisher and post "[title](http://example.com/file.ogg)" | ||
Then I should see a HTML5 audio player | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
Then /^I should see a HTML5 (video|audio) player$/ do |type| | ||
find(".post-content .media-embed") | ||
find(".stream-container").should have_css(".post-content .media-embed #{type}") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.