expo-libmpv 0.3.11 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -123,7 +123,15 @@ class LibmpvView(context: Context, appContext: AppContext) :
|
|
|
123
123
|
|
|
124
124
|
mpv.setOptionString("gpu-context", "android")
|
|
125
125
|
mpv.setOptionString("opengl-es", "yes")
|
|
126
|
-
|
|
126
|
+
|
|
127
|
+
// Nearly all of this block is to prevent choppy playback on Google streaming devices
|
|
128
|
+
mpv.setOptionString("video-sync", "audio")
|
|
129
|
+
mpv.setOptionString("audio-pitch-correction","yes")
|
|
130
|
+
mpv.setOptionString("scale", "bilinear")
|
|
131
|
+
mpv.setOptionString("dscale", "bilinear")
|
|
132
|
+
mpv.setOptionString("interpolation","no")
|
|
133
|
+
mpv.setOptionString("tscale","off")
|
|
134
|
+
mpv.setOptionString("correct-pts","yes")
|
|
127
135
|
|
|
128
136
|
mpv.setOptionString("ao", "audiotrack")
|
|
129
137
|
mpv.setOptionString("alang", "")
|
|
@@ -135,8 +143,6 @@ class LibmpvView(context: Context, appContext: AppContext) :
|
|
|
135
143
|
|
|
136
144
|
mpv.setOptionString("cache", "yes")
|
|
137
145
|
mpv.setOptionString("cache-pause-initial", "yes")
|
|
138
|
-
mpv.setOptionString("cache-secs", "5")
|
|
139
|
-
mpv.setOptionString("demuxer-readahead-secs", "5")
|
|
140
146
|
}
|
|
141
147
|
|
|
142
148
|
fun log(method: String, argument: String) {
|
|
@@ -179,12 +185,9 @@ class LibmpvView(context: Context, appContext: AppContext) :
|
|
|
179
185
|
val width = surfaceWidth ?: 0
|
|
180
186
|
val height = surfaceHeight ?: 0
|
|
181
187
|
|
|
182
|
-
// In the new Fabric version, this is stretching the content
|
|
183
|
-
//holder.setFixedSize(width, height)
|
|
184
|
-
//mpv.setPropertyString("android-surface-size", "${width}x${height}")
|
|
185
|
-
|
|
186
188
|
mpv.attachSurface(surfaceView)
|
|
187
189
|
prepareMpvPlayback()
|
|
190
|
+
mpv.setOptionString("vf", "scale=${width}:${height}")
|
|
188
191
|
isSurfaceCreated = true
|
|
189
192
|
log("LibmpvView.surfaceCreated", "Surface created and MPV should be playing")
|
|
190
193
|
}
|