Permalink
Browse files

Merge pull request #3200 from jwplayer/feature/rtl-menu-support

RTL menu support
  • Loading branch information...
karimMourra committed Dec 7, 2018
2 parents bf58362 + b9bf7de commit 110e824690fad882017289f375297bfb5918e2fe
@@ -100,6 +100,7 @@
line-height: 1;
padding: 7px 0 7px 15px;
width: 100%;
text-align: left;
&:hover {
color: @hover-color;
@@ -1,6 +1,6 @@
export default (content) => {
return (
`<button type="button" class="jw-reset jw-settings-content-item" role="menuitemradio" aria-checked="false">` +
`<button type="button" class="jw-reset-text jw-settings-content-item" role="menuitemradio" aria-checked="false" dir="auto">` +
`${content}` +
`</button>`
);
@@ -3,6 +3,7 @@ import SettingsSubmenu from 'view/controls/components/settings/submenu';
import SettingsContentItem from 'view/controls/components/settings/content-item';
import button from 'view/controls/components/button';
import { SimpleTooltip } from 'view/controls/components/simple-tooltip';
import { isRtl } from 'utils/language';
const AUDIO_TRACKS_SUBMENU = 'audioTracks';
const CAPTIONS_SUBMENU = 'captions';
@@ -98,7 +99,7 @@ export function removeQualitiesSubmenu(settingsMenu) {
export function addPlaybackRatesSubmenu(settingsMenu, rateList, action, initialSelectionIndex, tooltipText) {
const rateItems = rateList.map((playbackRate) => {
return SettingsContentItem(playbackRate, playbackRate + 'x', (evt) => {
return SettingsContentItem(playbackRate, isRtl(tooltipText) ? 'x' + playbackRate : playbackRate + 'x', (evt) => {
action(playbackRate);
settingsMenu.close(evt);
});

0 comments on commit 110e824

Please sign in to comment.