Tested this on the sample browser and found that on the current SystemEngine there, we don't have an interceptor on it and youtube is forever loading. Adding the SampleRequestInterceptor fixes this issue.
Doesn't work:
open class DefaultComponents(private val applicationContext: Context) {
// Engine
open val engine: Engine by lazy {
SystemEngine()
}
}
Works:
open class DefaultComponents(private val applicationContext: Context) {
// Engine
open val engine: Engine by lazy {
val defaultSettings = DefaultSettings().apply {
requestInterceptor = SampleRequestInterceptor()
}
SystemEngine(defaultSettings)
}
}
I haven't yet investigated what is causing this. We did recently change our settings API so my first place to look would be there.
Interesting. I saw the same today and was wondering why I can't load YouTube.
@jonalmeida and I looked into this and found that this isn't related to the interceptor and isn't a (new) bug in settings either. It's caused by the sample app not setting javascriptEnabled = true. So, by adding DefaultSettings (e.g. the interceptor), we also enabled javascript (default is true), which is why this worked after adding an interceptor.
So, this issue can be closed. Also, after merging #931, this will just work as all default settings are then always applied.
Most helpful comment
@jonalmeida and I looked into this and found that this isn't related to the interceptor and isn't a (new) bug in settings either. It's caused by the sample app not setting
javascriptEnabled = true. So, by addingDefaultSettings(e.g. the interceptor), we also enabled javascript (default is true), which is why this worked after adding an interceptor.So, this issue can be closed. Also, after merging #931, this will just work as all default settings are then always applied.