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

Preserve seek time and other parameters to amp-youtube from YouTube embeds #6423

Merged
merged 43 commits into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2b00609
Transfer seek time to AMP youtube component from youtube url
dhaval-parekh Jun 24, 2021
d5f56f7
Add php unit test cases
dhaval-parekh Jun 24, 2021
080ded2
Convert youtube iframe into amp-youtube
dhaval-parekh Jun 29, 2021
a4e3290
Add additional data params for amp-youtube components
dhaval-parekh Jun 29, 2021
2e47705
Add unit test case for youtube embeds
dhaval-parekh Jun 29, 2021
55fff1f
Fix the issues from unit test cases
dhaval-parekh Jun 29, 2021
e5fba98
Fix the issues from unit test cases
dhaval-parekh Jun 29, 2021
92ab4be
Use type casting instead of intval()
dhaval-parekh Jun 30, 2021
e9ad832
Add inline comments, remove unwanted code
dhaval-parekh Jun 30, 2021
a5d73e0
Update data-param for amp-youtube
dhaval-parekh Jun 30, 2021
eceb487
Update XPath query to fetch youtube iframe
dhaval-parekh Jul 1, 2021
8804f83
Fix php unit test cases
dhaval-parekh Jul 1, 2021
220af89
Apply suggestions from PR
dhaval-parekh Jul 7, 2021
cae32c0
Update amp youtibe embed handler
dhaval-parekh Jul 7, 2021
12a722c
update unit test cases
dhaval-parekh Jul 7, 2021
520be01
Update and fix unit test cases
dhaval-parekh Jul 7, 2021
8e484f0
Remove redundant code
dhaval-parekh Jul 7, 2021
6808668
Add support of live channel when added as raw iframe
dhaval-parekh Jul 8, 2021
f60fd46
Fix unit test cases
dhaval-parekh Jul 8, 2021
c35ecd9
Add unit test cases for live streaming channel
dhaval-parekh Jul 8, 2021
547f237
Update prepare_attribute()
dhaval-parekh Jul 9, 2021
32e9b2d
Update regex for to find seek time from URL
dhaval-parekh Jul 9, 2021
2d1785a
Add additional unit test cases for video seek time
dhaval-parekh Jul 9, 2021
3ecad1e
Sanitize attribute name
dhaval-parekh Sep 9, 2021
74dfcb8
update unit test cases
dhaval-parekh Sep 9, 2021
7f21703
Revert phpstan ignores
westonruter Sep 9, 2021
2c3ed4d
Try adding phpstan version to composer cache key
westonruter Sep 9, 2021
d519220
Revert "Revert phpstan ignores"
westonruter Sep 9, 2021
0524ae5
Print phpstan version when running on GHA
westonruter Sep 9, 2021
b9827d7
Try removing phpstan before composer install
westonruter Sep 9, 2021
fa6ee15
Fix yml syntax error
westonruter Sep 9, 2021
f93b9a1
Try downloading a specific version of phpstan instead of latest
westonruter Sep 9, 2021
9d51ef4
Try installing phpstan via shivammathur/setup-php
westonruter Sep 9, 2021
9d8e977
Fix issues identified by phpstan
westonruter Sep 9, 2021
8200f3f
Give more explicit array phpdoc type
westonruter Sep 9, 2021
edbcc6f
Remove unreachable code
westonruter Sep 9, 2021
32f358a
Opt to pass-through iframe for unrecognized YouTube URL rather than c…
westonruter Sep 9, 2021
1907df3
Remove condition which cannot be reached since video ID is always pro…
westonruter Sep 9, 2021
aac0e40
Use coversDefaultClass
westonruter Sep 9, 2021
d983fa4
Prevent generating closing IMG tags
westonruter Sep 9, 2021
9eefef9
Let placeholder link point to YouTube permalink and not iframe src
westonruter Sep 9, 2021
46bc356
Fix adding start to placeholder link; improve coverage
westonruter Sep 9, 2021
da36d2d
Make placeholder dependency on video ID more explicit
westonruter Sep 9, 2021
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
5 changes: 4 additions & 1 deletion .github/workflows/build-test-measure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ jobs:
# phpstan requires PHP 7.1+.
php-version: 7.4
extensions: dom, iconv, json, libxml, zip
tools: phpstan

- name: Get Composer Cache Directory
id: composer-cache
Expand All @@ -231,7 +232,9 @@ jobs:
run: composer install

- name: Static Analysis (PHPStan)
run: vendor/bin/phpstan analyse
run: |
phpstan --version
phpstan analyse

#-----------------------------------------------------------------------------------------------------------------------

Expand Down
4 changes: 3 additions & 1 deletion includes/embeds/class-amp-base-embed-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ abstract class AMP_Base_Embed_Handler {
/**
* Default width.
*
* @var int
* In some cases, this may be the string 'auto' when a fixed-height layout is used.
*
* @var int|string
*/
protected $DEFAULT_WIDTH = 600;

Expand Down
Loading