File tree Expand file tree Collapse file tree 4 files changed +8
-19
lines changed Expand file tree Collapse file tree 4 files changed +8
-19
lines changed Original file line number Diff line number Diff line change 10
10
strategy :
11
11
fail-fast : true
12
12
matrix :
13
- os : [ubuntu-20.04, windows-2019 ]
13
+ os : [ubuntu-20.04]
14
14
php : [8.1, 8.0]
15
15
laravel : [9.*]
16
16
ffmpeg : [5.0, 4.4]
35
35
- name : Install FFmpeg
36
36
uses : Iamshankhadeep/setup-ffmpeg@ffmpeg-5.0-20220119
37
37
with :
38
+ token : ${{ secrets.CI_GITHUB_TOKEN }}
38
39
version : ${{ matrix.ffmpeg }}
39
40
id : setup-ffmpeg
40
41
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ It's the *magic* of Inertia.js with the *simplicity* of Blade. [Splade](https://
29
29
* Built-in support for generating * VTT Preview Thumbnail* files.
30
30
* Requires PHP 8.0 and 8.1.
31
31
* Tested with FFmpeg 4.4 and 5.0.
32
- * Lots of integration tests, GitHub Actions with both Ubuntu and Windows.
33
32
34
33
## Installation
35
34
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ private function getTimestamp(int $thumbKey): string
63
63
'%02d:%02d:%02d.000 ' ,
64
64
($ thumbKey * $ this ->tileFilter ->interval ) / 3600 ,
65
65
($ thumbKey * $ this ->tileFilter ->interval ) / 60 % 60 ,
66
- ($ thumbKey * $ this ->tileFilter ->interval ) % 60
66
+ ($ thumbKey * $ this ->tileFilter ->interval ) % 60
67
67
);
68
68
}
69
69
@@ -83,7 +83,7 @@ public function getContents(): string
83
83
return Collection::range (1 , $ totalFiles * $ thumbsPerTile )
84
84
->map (function ($ thumb ) use ($ thumbsPerTile ) {
85
85
$ start = $ this ->getTimestamp ($ thumb - 1 , $ this ->tileFilter ->interval );
86
- $ end = $ this ->getTimestamp ($ thumb , $ this ->tileFilter ->interval );
86
+ $ end = $ this ->getTimestamp ($ thumb , $ this ->tileFilter ->interval );
87
87
88
88
$ fileKey = ceil ($ thumb / $ thumbsPerTile );
89
89
@@ -93,7 +93,7 @@ public function getContents(): string
93
93
);
94
94
95
95
$ positionOnTile = ($ thumb - 1 ) % $ thumbsPerTile ;
96
- $ position = $ this ->getPositionOnTile ($ positionOnTile );
96
+ $ position = $ this ->getPositionOnTile ($ positionOnTile );
97
97
98
98
return implode (PHP_EOL , [
99
99
"{$ start } --> {$ end }" ,
Original file line number Diff line number Diff line change @@ -10,17 +10,6 @@ class VTTPreviewThumbnailsGeneratorTest extends TestCase
10
10
{
11
11
use MatchesSnapshots;
12
12
13
- private function updateWindowsNewLines ($ content )
14
- {
15
- if (!windows_os ()) {
16
- return $ content ;
17
- }
18
-
19
- $ content = str_replace ("\r\n" , "\n" , $ content );
20
- $ content = str_replace ("\n" , "\r\n" , $ content );
21
-
22
- return $ content ;
23
- }
24
13
25
14
/** @test */
26
15
public function it_can_generate_a_vtt_file ()
@@ -34,7 +23,7 @@ public function it_can_generate_a_vtt_file()
34
23
35
24
$ generator = new VTTPreviewThumbnailsGenerator ($ tile , 250 , fn () => "sprite_%d.jpg " );
36
25
37
- $ this ->assertMatchesTextSnapshot ($ this -> updateWindowsNewLines ( $ generator ->getContents () ));
26
+ $ this ->assertMatchesTextSnapshot ($ generator ->getContents ());
38
27
}
39
28
40
29
/** @test */
@@ -51,7 +40,7 @@ public function it_can_generate_a_vtt_file_with_a_non_sqaure_grid()
51
40
return "sprite_ {$ i }.jpg " ;
52
41
});
53
42
54
- $ this ->assertMatchesTextSnapshot ($ this -> updateWindowsNewLines ( $ generator ->getContents () ));
43
+ $ this ->assertMatchesTextSnapshot ($ generator ->getContents ());
55
44
}
56
45
57
46
/** @test */
@@ -70,6 +59,6 @@ public function it_can_generate_a_vtt_file_and_keep_the_margin_and_padding_in_ac
70
59
return "sprite_ {$ i }.jpg " ;
71
60
});
72
61
73
- $ this ->assertMatchesTextSnapshot ($ this -> updateWindowsNewLines ( $ generator ->getContents () ));
62
+ $ this ->assertMatchesTextSnapshot ($ generator ->getContents ());
74
63
}
75
64
}
You can’t perform that action at this time.
0 commit comments