Merge pull request #140 from trulex/master
Added options for setting subtitle font scale and color.
Esse commit está contido em:
+5
-1
@@ -57,6 +57,10 @@ the MDNS scan.
|
||||
* `--subtitles <path/URL>` This can be a path or URL to a vtt or srt file that
|
||||
contains subtitles.
|
||||
|
||||
* `--subtitle-scale 1.5` Scaling factor for the size of the subtitle font. Default is 1.0.
|
||||
|
||||
* `--subtitle-color #FFFFFFFF` Foreground RGBA color of the subtitle font.
|
||||
|
||||
* `--myip 192.168.1.8` Your main IP address \(useful if you have multiple network adapters)
|
||||
|
||||
* `--quiet` Hide the player timeline.
|
||||
@@ -110,7 +114,7 @@ Some problems have already been addressed in our wiki https://github.com/xat/cas
|
||||
|
||||
`npm install castnow -g`
|
||||
|
||||
### contributers
|
||||
### contributors
|
||||
|
||||
* [tooryx](https://github.com/tooryx)
|
||||
* [przemyslawpluta](https://github.com/przemyslawpluta)
|
||||
|
||||
@@ -30,6 +30,8 @@ if (opts.help) {
|
||||
'--device <name> The name of the Chromecast device that should be used',
|
||||
'--address <ip> The IP address or hostname of your Chromecast device',
|
||||
'--subtitles <path/url> Path or URL to an SRT or VTT file',
|
||||
'--subtitle-scale <scale> Subtitle font scale',
|
||||
'--subtitle-color <color> Subtitle font RGBA color',
|
||||
'--myip <ip> Your local IP address',
|
||||
'--quiet No output',
|
||||
'--peerflix-* <value> Pass options to peerflix',
|
||||
|
||||
@@ -31,10 +31,10 @@ var attachSubtitles = function(ctx) {
|
||||
}
|
||||
ctx.options.playlist[0].media.textTrackStyle = {
|
||||
backgroundColor: '#00000000',
|
||||
foregroundColor: '#FFFF00FF',
|
||||
foregroundColor: ctx.options['subtitle-color'] || '#FFFF00FF',
|
||||
edgeType: 'OUTLINE',
|
||||
edgeColor: '#000000FF',
|
||||
fontScale: 1,
|
||||
fontScale: ctx.options['subtitle-scale'],
|
||||
fontStyle: 'NORMAL',
|
||||
fontFamily: 'Droid Sans',
|
||||
fontGenericFamily: 'SANS_SERIF',
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário