Using basemaps with QGIS temporal controller

QGIS 3.14

Old version:

for i, layer in enumerate(QgsProject.instance().mapLayers().values()):
    if isinstance(layer, QgsRasterLayer):
        mode = QgsRasterLayerTemporalProperties.ModeFixedTemporalRange
        tprops = layer.temporalProperties()
        tprops.setFixedTemporalRange(QgsDateTimeRange(QDateTime(QDate(2020, 1, 1), QTime(1, i, 0, 0), Qt.UTC),
                                                   QDateTime(QDate(2020, 1, 1), QTime(1, 1+i, 0, 0), Qt.UTC)))

        tprops.setMode(mode)
        tprops.setIsActive(True)
https://github.com/Mariosmsk/qgis-python