#
# Copyright (C) 2000 - 2024 Silverpeas
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# As a special exception to the terms and conditions of version 3.0 of
# the GPL, you may redistribute this Program in connection with Free/Libre
# Open Source Software ("FLOSS") applications as described in Silverpeas's
# FLOSS exception.  You should have received a copy of the text describing
# the FLOSS exception, and it is also available here:
# "https://www.silverpeas.org/legal/floss_exception.html"
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#

# Each streaming provider is referenced by an identifier.
# This parameter lists the streaming provider identifiers each one separated by a comma.
streaming.provider.handledIds = youtube,vimeo,dailymotion,soundcloud

# For each streaming provider, some parameters MUST be defined and some CAN be optionally defined.
# Following parameter MUST be a regexp which permits extracting streaming identifier from a full URL of a streaming.
# Second regexp matching group is taken into account for the identifier extraction.
# The first group is just permitting to hit several URL cases.
# [providerId] parameter part MUST be an identifier referenced by 'streaming.provider.handledIds' parameter.
streaming.provider.[providerId].urlIdExtractorRegexpPattern=
# oembed (https://oembed.com) URL pattern that permits to build the HTTP request to get
# standard oembed data from the concerned streaming provider.
# The pattern format will be applied to java String#format method.
# [providerId] parameter part MUST be an identifier referenced by 'streaming.provider.handledIds' parameter.
streaming.provider.[providerId].oembedUrlStringPattern=
# Optional parameter in order to indicate if the data to inject into pattern defined by parameter
# 'streaming.provider.[providerId].oembedUrlStringPattern' MUST be the identifier of the streaming (by default)
# or the full URL of a streaming (false).
# [providerId] parameter part MUST be an identifier referenced by 'streaming.provider.handledIds' parameter.
streaming.provider.[providerId].justIdInOembedUrl=
# Optional parameter that permits to specify regexp to identify different kind of streaming URL of a provider.
# This parameter MAY be defined if regexp group 1 of parameter 'streaming.provider.[providerId].urlIdExtractorRegexpPattern'
# does not permit to identify all kinds of streaming URL of a streaming provider.
# [providerId] parameter part MUST be an identifier referenced by 'streaming.provider.handledIds' parameter.
streaming.provider.[providerId].additionalRegexpDetectionParts=

# All URL MUST be specified with http protocol (and not https). The server will automatically change
# the protocol against the platform environment.

streaming.provider.youtube.urlIdExtractorRegexpPattern=(?i)([?]|[&])v=([a-z0-9]+)
streaming.provider.youtube.oembedUrlStringPattern=http://www.youtube.com/oembed?url=%s&format=json
streaming.provider.youtube.justIdInOembedUrl=false
streaming.provider.youtube.additionalRegexpDetectionParts=youtu

streaming.provider.vimeo.urlIdExtractorRegexpPattern=(?i)(/|=)([0-9]+)
streaming.provider.vimeo.oembedUrlStringPattern=http://vimeo.com/api/oembed.json?url=http://vimeo.com/%s

streaming.provider.dailymotion.urlIdExtractorRegexpPattern=(?i)(/video/|dai.ly/)([a-z0-9]+)
streaming.provider.dailymotion.oembedUrlStringPattern=http://www.dailymotion.com/services/oembed?url=http://www.dailymotion.com/video/%s
streaming.provider.dailymotion.additionalRegexpDetectionParts=dai.ly

streaming.provider.soundcloud.urlIdExtractorRegexpPattern=(?i)(soundcloud.com/)(.+)
streaming.provider.soundcloud.oembedUrlStringPattern=http://soundcloud.com/oembed?url=http://soundcloud.com/%s&format=json