videobackgroud para iOS viejos #371
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Se agregaron las funciones getQS(permite leer valores de parámetros en el query string de la URL, útil para activar comportamientos condicionales como forceOldIOS) y resolvePoster(centraliza la lógica para obtener la imagen poster del video desde diferentes estructuras posibles de datos en Strapi) para mejorar la obtención de datos en VideoBackground
La lógica para obtener el póster ahora está en resolvePoster(), que maneja todas las formas en que puede venir la info desde Strapi y arma bien la URL
El caso especial para iOS viejo se maneja fuera de getVideoContent. no mezcla responsabilidades.
Se removieron varios isRequired en propTypes de VideoBackground porque muchos de esos props son opcionales para el flujo actual y el componente ya tiene los fallbacks para manejar su ausencia. Mantenerlos como obligatorios generaba advertencias innecesarias.